How to get list of all tables in MS SQL Server?

select TABLE_NAME from information_schema.tables where Table_Type = 'BASE TABLE'


Wednesday, March 12, 2008 | Comments (4) | Add Comment

Comments

Gravatar

Exactly what I was looking for

Thanks guys this is exactly what I was looking for.

6/24/2008 2:19:48 AM | by Timothy Kruger
Gravatar

Re:How to get list of all tables in MS SQL Server?

Hi, I am tracing data on application which generated temp tables into TempDB. How can use "select statement" to display these data whereby having table name start with dbo.#xxxxx?
Thanks.

3/5/2009 6:37:35 PM | by Joan Lim
Gravatar

Joan,
I can honestly say that I don't know.

Gravatar

Re:How to get list of all tables in MS SQL Server?

Hi,
use the below to list all the tables:
sp_tables

5/28/2009 9:22:20 PM | by Aravindhan
Gravatar

Re:How to get list of all tables in MS SQL Server?

How to get list of all tables and detail about the table (eg: owner name ,view ,triger ,identity,pinned ,filegroup, no of rows etc) in MS SQL Server?

Thanks in advance

5/28/2009 9:25:17 PM | by aravindhan
Gravatar

Try following queries, may be you can find something useful in there:

select * from information_schema.COLUMNS
select * from information_schema.KEY_COLUMN_USAGE
select * from information_schema.TABLE_CONSTRAINTS

New Comment

Your Name:
Email (for internal use only):
Subject:
Comment:
 
Code above:

Categories

Recent Tweets

Valid XHTML 1.0 Transitional