Wednesday, 9 July 2014

List All Tables in a Database




Description: Query to get list of all the tables in SQL server.


USE TestDB
SELECT * FROM information_schema.tables
OR
USE  TestDB
SELECT * FROM SYS.tables
OR
SELECT * FROM sysobjects WHERE xtype='U'













Once we run above query we will get all tables name in specific Database

1 comment: