Advertisement
VanillaGranilla

getAllTableNamesWithSchema.sql

Feb 27th, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.15 KB | None | 0 0
  1. USE <DBNAME>;
  2.  
  3. SELECT s.NAME + '.' + t.NAME AS TableName
  4. FROM sys.TABLES t
  5. INNER JOIN sys.schemas s
  6.     ON t.schema_id = s.schema_id ORDER BY TableName
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement