Xpode.com        Click here to Print this article.

Get the list of all tables of a database

In sql server 2005, We can get the list of tables from the Sys.Tables from a database. With the below query we can get the list of all tables in a database.

SELECT * FROM sys.Tables

With below query we may find the list of Views also with the tables.

SELECT * FROM information_schema.Tables


Contributed by:
Rohit kakria
I am software developer, moderator of xpode.com

Resourse address on xpode.com

Click here to go on website