Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-08-08 : 09:15:26
|
| swing writes "in SQL query analyzer how to return table list in a database?" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-08-08 : 09:15:47
|
| SELECT table_name FROM INFORMATION_SCHEMA.TABLES |
 |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-08-08 : 09:59:36
|
However that will also return views and system tables which may or may not be what you want. select TABLE_NAME from INFORMATION_SCHEMA.TABLESwhere TABLE_TYPE='BASE TABLE' --Exclude viewsand OBJECTPROPERTY(OBJECT_ID(TABLE_NAME),'IsMSShipped')=0 --exclude system tables HTHJasper Smith |
 |
|
|
|
|
|