GeekInterview.com
Series: Subject: Topic:
Question: 97 of 427

Find all tables in a database

How to find all the tables existing in a database?
Asked by: vinodhinifelix | Member Since Sep-2006 | Asked on: Apr 22nd, 2008

View all questions by vinodhinifelix

Showing Answers 1 - 3 of 3 Answers

Select * from tab;

Yes  1 User has rated as useful.
  
Login to rate this answer.
Imran_Javed

Answered On : May 8th, 2008

View all answers by Imran_Javed

SELECT TABLE_NAME FROM All_TABLESOrder by TABLE_NAME;The above query will display all the table names in the database.SELECT TABLE_NAME FROM USER_TABLESOrder by TABLE_NAME;The above query will display all the table names in a particular schema.

Yes  1 User has rated as useful.
  
Login to rate this answer.

To view tables in the current schemaSELECT OBJECT_NAME FROM USER_OBJECTS WHERE OBJECT_TYPE = 'TABLE'To view all the tables that you have access SELECT OBJECT_NAME FROM ALL_OBJECTS WHERE OBJECT_TYPE = 'TABLE'To view all the tables in the databaseSELECT OBJECT_NAME FROM DBA_OBJECTS WHERE OBJECT_TYPE = 'TABLE'You may use user_tables instead of user_objects.

Yes  1 User has rated as useful.
  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.