Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do I list the available tables in a database I'm
querying?

Answers were Sorted based on User's Feedback



How do I list the available tables in a database I'm querying?..

Answer / guest

You can get a list of tables in a database by calling the
INFORMATION_SCHEMA.Tables view like this:

SELECT * FROM information_schema.tables

Is This Answer Correct ?    7 Yes 0 No

How do I list the available tables in a database I'm querying?..

Answer / shraddha

sp_tables

Is This Answer Correct ?    3 Yes 0 No

How do I list the available tables in a database I'm querying?..

Answer / kumar.t

Simple query

To Display only user created table.

Select * from sysobjects where xtype='u'

To Display all table.

Select * from sysobjects

Is This Answer Correct ?    3 Yes 0 No

How do I list the available tables in a database I'm querying?..

Answer / sanjeev kumar

First Method:

select table_name from information_schema.tables


Second Method:

Select Name from sysobjects where xtype='u'

Note: here 'u' means user created

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

what is difference between NULL and ISNULL in SQL Server 2008?

0 Answers   MCN Solutions,


Difference between primary key and clustered index?

0 Answers  


Define full outer join in sql server joins?

0 Answers  


What is msdb database? : SQL Server Architecture

0 Answers  


Where are magic tables stored ? Is it in the same database where it is created ?

4 Answers  


How do you Implement SSIS Packages in your Project?

0 Answers  


How to create function without parameter in sql server?

0 Answers  


How many databases Microsoft SQL server provides?

0 Answers   Abacus,


can you any body tell me simple recovery,full recovery,bulk logged recovery where can use?

1 Answers  


Do you know the different ddl commands in sql?

0 Answers  


What are logical/boolean operations in ms sql server?

0 Answers  


What is a non clustered primary key?

0 Answers  


Categories