If you write
SELECT * from sys.tables
It will return all the details with list of tables.
It will not give the name of schema instead you will get schema Id.
If you want schema name write this querySELECT '['+SCHEMA_NAME(schema_id)+'].['+name
+']'AS SchemaTable
FROM sys.tables
SQL SERVER - List the schema name and Table name for a database
Reviewed by
kamal kumar das
on
February 24, 2012
Rating:
5
No comments: