Groups | Blog | Home
all groups > sql server programming > november 2004 >

sql server programming : print list of tables


smk23
11/27/2004 7:21:02 PM
Greetings and thanks! Hope everyone had a great Thanksgiving.
Is there a way to print the list of tables in a SQL 2k DB?
--
John Gilson
11/28/2004 3:35:15 AM
[quoted text, click to view]

SELECT *
FROM INFORMATION_SCHEMA.TABLES

If you don't want views included, then

SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE table_type = 'BASE TABLE'

--
JAG

AddThis Social Bookmark Button