#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    Mexico, DF
    Posts
    249
    Rep Power
    11

    How to retrieve table schema in Oracle


    Hi !,

    I'd like to know which SQL command (if there is any) I can use to display the current schema of a table. I'm particular interested in knowing which columns are indexes.

    My privileges to the DB are quite basic (I think that I'nm only allowed to run SELECT statements

    This is the Oracle version that I'm using:

    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE 9.2.0.6.0 Production
    TNS for HPUX: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production

    Thanks in advance.
    Regards. Germán.

    "Lo importante no es saber, sino tener el teléfono del que sabe." - Les Luthiers
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    834
    Rep Power
    387

    Talking



    Download SQL Developer free from Oracle.

    -- or -- Just query the {ALL|DBA|USER}_IND_COLUMNS view.

    PS: You may need to be granted "SELECT_CATALOG_ROLE" for SQL Developer if you want to look at other schemas apart from yours (or login with the schema password).
    Last edited by LKBrwn_DBA; May 23rd, 2007 at 08:08 AM.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    Mexico, DF
    Posts
    249
    Rep Power
    11
    Thanks a lot for you answer!.

    This is what worked for me:

    Code:
    SELECT * FROM ALL_IND_COLUMNS WHERE TABLE_NAME='XXXXX'
    Regards. Germán.

    "Lo importante no es saber, sino tener el teléfono del que sabe." - Les Luthiers

IMN logo majestic logo threadwatch logo seochat tools logo