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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list all Tables

Status
Not open for further replies.

Sphere

MIS
Aug 29, 2002
1
US
Is there a sql statement to list all the tables in a db
 
This is a regular question to which the answer is &quot;It depends on which DBMS you are using&quot;. [sig]<p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>Top man[/sig]
 
Assume its ms sql 6 or 7 then open a query window, select the database and type

select name from sysobjects where type = 'u' order by name

[sig]<p>Dave<br><a href=mailto:dab@completebs.com>dab@completebs.com</a><br><a href= Bsuiness Systems</a><br>See website for more info but we can develop most things for most people.[/sig]
 
select table_name from all_tables

for oracle [sig]<p> Nick<br><a href=mailto:ndaniels@ventura-uk.com>ndaniels@ventura-uk.com</a><br><a href= > </a><br>If it's Data Warehousing or related then I want to know - but post it to the forum![/sig]
 
in ingres

select *
from iitables
[sig]<p>Ged Jones<br><a href=mailto:gedejones@hotmail.com>gedejones@hotmail.com</a><br><a href= > </a><br>Top man[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top