GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  SQL Server
Go To First  |  Previous Question  |  Next Question 
 SQL Server  |  Question 44 of 68    Print  
To display list of tables in database
How to display list of tables from a particular database in MS-SQL
How to display description of that particular table?



  
Total Answers and Comments: 3 Last Update: February 19, 2009     Asked by: vijju31_1985 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 29, 2008 15:01:08   #1  
LGSGEEK Member Since: March 2008   Contribution: 3    

RE: To display list of tables in database
Submit a query on the SYS.TABLES table to get all of the data about the tables in a specific database. Be sure to specify the database that you are targeting.

USE <database name> -- Specify your target database name (without the brackets)

GO

SELECT * FROM SYS.TABLES
GO

 
Is this answer useful? Yes | No
January 30, 2009 06:30:57   #2  
sivasangari_2006 Member Since: June 2008   Contribution: 2    

RE: To display list of tables in database
use <database name>
sp_help

It displays all the tables created in that database

 
Is this answer useful? Yes | No
February 19, 2009 15:02:45   #3  
cybersavvy Member Since: February 2009   Contribution: 16    

RE: To display list of tables in database
To Display list of tables in the database:
SELECT * FROM INFROMATION_SCHEMA.TABLES WHERE TYPE 'basetable'

To describe the structure of a particular table
SP_HELP table_name;

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape