Get all table names and column names of database in SQL Server database
-----------Get Table names------------ SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_CATALOG='DatabaseName'
----------Get Column Names-----------
SELECT COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='TableName'
0 Comments