[sql server 2005]how to list all table name in T-SQL
- by shrimpy
SELECT name FROM sys.databases  -- this can list all database name in the server
user database
SELECT * FROM INFORMATION_SCHEMA.TABLES  -- these two line can list the table for one particular database 
but how to do something in order can have the result like the following
Database              Table
---------             -------------
db1                    t1
db1                    t2
db2                    t1
...                    ...
-thx