SQL tutorial | Interview questions | Oracle
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How To List All Tables in Your Schema?

Go down

How To List All Tables in Your Schema? Empty How To List All Tables in Your Schema?

Post by Micheal Tue Jan 19, 2010 7:27 am

If you log in with your Oracle account, and you want to get a list of all tables in your schema, you
can get it through the USER_TABLES view with a SELECT statement, as shown in the following
SQL script:
SQL> connect HR/fyicenter
Connected.
SQL> SELECT table_name, status, num_rows FROM USER_TABLES;
TABLE_NAME STATUS NUM_ROWS
------------------------------ -------- ----------
REGIONS VALID 4
LOCATIONS VALID 23
DEPARTMENTS VALID 27
JOBS VALID 19
EMPLOYEES VALID 107
JOB_HISTORY VALID 10
COUNTRIES VALID 25
7 rows selected.

Micheal
Admin

Posts : 243
Join date : 2010-01-10

http://sql-tutorial.co.cc

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum