Saturday 29 March 2014

SQL Server - Query to Get List of Tables in Database in SQL Server 2008

Hi Friends,in this article i will explain about  Query to Get List of Tables in Database in SQL Server 2008.
I already explained in the previous article about How to Get List of Stored Procedures based on table name search, using sql server 2008?,Differences and Similarities Between LEN and DATALENGTH Functions in SQL Server and Common Table Expressions(CTE) in SQL SERVER 2008
Way 1:
USE DBName      --- Take your DB name
SELECT * FROM information_schema.tables

The output of the above code as shown in the below figure.

Way 2:
USE DBName      --- Take your DB name
SELECT * FROM sys.tables


The output of the above code as shown in the below figure.

"If you like my blog or articles, you can appreciate by leaving your comments or Liking my Facebook page Aspdotnet-kishore, following on Google+ Aspdotnet-Kishore, Twitter  on AspdotnetKishore, Linked in Aspdotnet-Kishore, stumbling my posts on stumble upon and subscribing on  RSSfeed Aspdotnet-Kishore  for free updates directly to your Email inbox . Watch my blog  for more articles."

No comments:

Post a Comment

© 2012-2018 Aspdotnet-Kishore.blogspot.com. All Rights Reserved.
The content is copyrighted to Kishore and may not be reproduced on other websites without permission from the owner.