If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > How to get A list of table in SQL database ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-20-04, 05:29
spec7d spec7d is offline
Registered User
 
Join Date: Aug 2004
Posts: 1
Question How to get A list of table in SQL database ?

Hi everybody

I am new to SQL and would be pleased if any one can help me out...
thank

What query should i used to get a list of table currently available in the database.
Reply With Quote
  #2 (permalink)  
Old 08-20-04, 06:01
Littlefoot Littlefoot is offline
Lost Boy
 
Join Date: Jan 2004
Location: Croatia, Europe
Posts: 3,629
In Oracle you'd - if you're owner of the schema - issue
SELECT * FROM TAB;

To view all tables in your database, connect as a user with system privileges and try
SELECT * FROM ALL_TABLES;
Reply With Quote
  #3 (permalink)  
Old 08-20-04, 08:41
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
If your server supports the INFORMATION_SCHEMA views, those would be my first suggestion. They are database engine agnostic, and implemented by almost all of the major vendors.

If it doesn't, can you tell us which engine you are using (Db2, MS-SQL, MySQL, Oracle, etc) so we can concoct the appropriate engine specific SQL for you?

-PatP
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On