How to list all tables form a database?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: How to list all tables form a database?

  1. #1
    Join Date
    Feb 2006
    Posts
    5

    How to list all tables form a database?

    Hi,

    I try to list all tanles from a database, I have searched for this and have not found anything. In DB2, I can use "list tables", in MySQL I can use "show tables". Does Oracle have a corresponding command to do this? Thanks.

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    By "all" tables you mean regardless of owner? The dba_tables is what you need to query. If less than 100%, then variations of #1 below (restricted by owner for dba_ and all_) can be used.

    1) select table_name from dba/all/user_tables

    A quickie query for a user is:
    2) select * from tab;

    ("TAB is included for compatibility with Oracle version 5. Oracle Corporation recommends that you do not use this view.")

  3. #3
    Join Date
    Mar 2004
    Location
    India
    Posts
    72
    You can use tabs also...

    tab will result 'View' also, but tabs not.

    select table_name from tabs

    --Sathy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width