Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I list all the available tables in a database?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi, how do I list all available tables in a database in the SQLPlus?
Thanks in advance.
Felipe
fsolanet@magpage.com

 
Assuming you are talking about user tables not system tables. The following SQL should list out all the tables for you:

select table_name from user_tables;

Mike
 
You can use:

select *
from tab;

select *
from tabs;
 
The above list all tables in the current schema that you are logged on to. If you want all tables that exist on the database server then you need to do the following:

SELECT owner,
table_name
FROM all_tables
WHERE OWNER <> 'SYS' AND
OWNER <> 'SYSTEM'

This will list all database tables on the database server except the system ones in SYS and SYSTEM.

Hope of some use

LokiDBA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top