How do I list the available tables in a database I'm
querying?
Answers were Sorted based on User's Feedback
Answer / guest
You can get a list of tables in a database by calling the
INFORMATION_SCHEMA.Tables view like this:
SELECT * FROM information_schema.tables
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / kumar.t
Simple query
To Display only user created table.
Select * from sysobjects where xtype='u'
To Display all table.
Select * from sysobjects
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sanjeev kumar
First Method:
select table_name from information_schema.tables
Second Method:
Select Name from sysobjects where xtype='u'
Note: here 'u' means user created
Is This Answer Correct ? | 0 Yes | 0 No |
How to handle error or exception in sql?
What's the maximum size of a row?
How to enforce security in sql server? : sql server security
Can a table have 2 primary keys?
What are the all different types of Joins in SQL Server 2000, Anybody can explain each join with definition..Thanks in advance....
9 Answers DELL, i Tech, Infosys, Siemens, TCS,
What is difference between createstatement and preparedstatement?
Without Using Cursors , How to Select the Selected row??
3 Answers CarrizalSoft Technologies, Wipro,
What do you understand by physical_only option in dbcc checkdb?
What xml support does the sql server extend?
If any stored procedure is encrypted, then can we see its definition in activity monitor?
What is dml command?
Tell me time data type, datetime2, datetimeoffset data type in sql server 2008?