July 6, 2013

To List the Schema Name and Table Name in MS SQL

The script which generates all the tables name in database along with its schema name.

SELECT '['+SCHEMA_NAME(schema_id)+'].['+name+']'AS SchemaTableFROM sys.tables

No comments:

Post a Comment