Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Quick SQL Question

Options
  • 23-11-2005 10:57am
    #1
    Registered Users Posts: 871 ✭✭✭


    Is there any way to view all of the table/ views/etc that you've created in an Oracle db? If so, how?


    Thanks
    Ger...


Comments

  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    "SHOW TABLES" works in MySQL...


  • Registered Users Posts: 871 ✭✭✭gerTheGreat


    Nope "show tables"/ "show table", return

    SP2-0158: unknown SHOW option "tables"
    or
    SP2-0158: unknown SHOW option "table"

    (Thanks anyway;) )
    any other ideas?:confused:


  • Closed Accounts Posts: 73 ✭✭seedot


    SQL Server has a 'sysobjects' table that you can do a select on. I assume Oracle has something similar.


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    According to Google,
    "SELECT * FROM ALL_TABLES;"

    Should work.


  • Registered Users Posts: 871 ✭✭✭gerTheGreat


    That got it:D

    Cheers;)
    ger...


  • Advertisement
  • Registered Users Posts: 19,396 ✭✭✭✭Karoma


    ..glad you found it.
    SELECT whatever FROM CAT;
    should do the trick (IIRC..which i most likely don't)


  • Moderators, Politics Moderators Posts: 39,788 Mod ✭✭✭✭Seth Brundle


    SELECT * FROM USER_TABLES;
    If you throw in a wher clause, remember that the names are in upper case!


  • Registered Users Posts: 2,781 ✭✭✭amen


    for MSSQL don't be using sys tables use the information_schema views
    MS don't guranatee that the sys tables will be the same between MS SQL version but the information_schema views should be


Advertisement