.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

syntax or command for list of Tables

Posted By: Syed Shakeer Hussain     Posted Date: August 25, 2009    Points:2   Category :Sql Server
What is the syntax or command for displaying list of Tables using sqlserver?

Responses
Author: Venkat             
Posted Date: August 25, 2009     Points: 5   

Hi,
You can use this query to list out all the able in database and system tables


SELECT * FROM sys.Tables

SELECT * FROM information_schema.Tables


Mark As Answer if this solve your problem
Warm Regards,
Venkat
Author: Nabin             
Posted Date: August 31, 2009     Points: 5   

Hi Venkat
What is the syntax for displaying all the table of a particular database.

Thanks
Nabin

Author: Venkat             
Posted Date: September 03, 2009     Points: 5   

Hi Nabin,

This SQL Query will return all the tables present in selected database.


SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
ORDER BY TABLE_NAME


Mark As Answer if this solve your problem
Warm Regards,
Venkat


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend