Showing posts with label How to get table names from SQL server. Show all posts
Showing posts with label How to get table names from SQL server. Show all posts

Wednesday, 23 April 2014

How to get table names from SQL server

How to get table names from SQL server
SELECT *
FROM Master.INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' order by TABLE_TYPE
SELECT *
FROM Master.INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'VIEW' order by TABLE_TYPE
General
SELECT *
FROM WorkDB.INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'VIEW' order by TABLE_TYPE