Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    1

    Question Unanswered: 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.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    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;

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    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

Posting Permissions

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