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

When columns are added to existing tables, what do they initially contain?

0 Answers  


What do you understand by sql server agent?

0 Answers  


What are user-defined functions (udfs) in sql server?

0 Answers  


Do you know what guidelines should be followed to help minimize deadlocks?

0 Answers  


What are the disadvantages of using querystrings to send data from one page to another?

0 Answers  


What are extended events in sql server?

0 Answers  


How many types of subqueries are there in sql server?

0 Answers  


When should you use an instead of trigger?

0 Answers  


Can you pass expressions to stored procedure parameters?

0 Answers  


What is primary key and example?

0 Answers  


What is a result set object returned by mssql_query()?

0 Answers  


CLR Integration ? what is Notification services ?

1 Answers   HCL, Satyam,


Categories