Home
Manage Your Code
Snippet: SQL script to list user tables (SQL)
Title: SQL script to list user tables Language: SQL
Description: Handy script to use if you want to get all your tables in a database. Views: 806
Author: Christopher Hujanen Date Added: 11/17/2007
Copy Code  
SELECT t.NAME AS 'Table'  --, *
FROM sys.tables t
WHERE t.NAME <> 'sysdiagrams'
	AND t.type_desc = 'USER_TABLE' -- Not sure this is needed or not
ORDER BY t.NAME
Usage
Execute the script.