Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Quick SQL Question

  • 23-11-2005 10:57AM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 68,173 ✭✭✭✭seamus


    "SHOW TABLES" works in MySQL...


  • Registered Users, Registered Users 2 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, Registered Users 2 Posts: 68,173 ✭✭✭✭seamus


    According to Google,
    "SELECT * FROM ALL_TABLES;"

    Should work.


  • Registered Users, Registered Users 2 Posts: 871 ✭✭✭gerTheGreat


    That got it:D

    Cheers;)
    ger...


  • Advertisement
  • Registered Users, Registered Users 2 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, Paid Member Posts: 44,254 Mod ✭✭✭✭Seth Brundle


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

    Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/ .



  • Registered Users, Registered Users 2 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