Showing posts with label User tables. Show all posts
Showing posts with label User tables. Show all posts

Finding user tables

Friday, 15 May 2009

The are three best possible ways to find the "user tables" in SQL Server.


> SELECT NAME
   FROM SYS.OBJECTS
   WHERE TYPE='U'

> SELECT * 
FROM INFORMATION_SCHEMA.TABLES 
WHERE TABLE_TYPE='BASE TABLE'

> EXEC SP_TABLES @TABLE_TYPE="'TABLE'"

Comment the one that you use often and the other ways to find the user tables.