Monday, June 14, 2010

List all user tables of a database in SQL server

List all user defined tables of a databse in SQL server.

SELECT *

FROM INFORMATION_SCHEMA.Tables

WHERE TABLE_TYPE = 'BASE TABLE'

AND TABLE_NAME != 'sysdiagrams'

No comments:

Post a Comment