DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: How to get the info about the table

  1. #1
    Join Date
    Sep 2001
    Posts
    99

    How to get the info about the table

    I want to know the info of the table,includes column name,column type,etc.And I want to export the info into a xml file ,how to do?
    ocean

  2. #2
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304
    desc tablename
    Agasimani
    OCP(10g/9i/8i/8)

  3. #3
    Join Date
    Sep 2001
    Posts
    99

    How to do?

    desc tablename ?I use it,but no info.and I want to know the tablename from database.
    I means I want to know all the info about table,view,package,trigger,etc.and import all the info to a xml file.I want to get a data dict.
    which sys table record the info about that?
    ocean

  4. #4
    Join Date
    Sep 2001
    Posts
    99

    please help

    thanks
    ocean

  5. #5
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    DBA_OBJECTS
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

  6. #6
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    If your using 9i you can get the schema DDL from the DBMS_METADATA package (GET_DDL) the following link will help:

    http://download-west.oracle.com/docs...eral.htm#14343

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  7. #7
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304

    Lightbulb

    I want to know the info of the table,includes column name,column type,etc.And I want to export the info into a xml file ,how to do?

    You said you want column name, type and I said DESC tablename. And for your info this command gives both column name and type. If you want more info, then you should specify that clearly in your post. Dont expect people to read your mind.

    If you want more details then analyze the table and look into USER_TABLES view.
    Agasimani
    OCP(10g/9i/8i/8)

  8. #8
    Join Date
    Apr 2001
    Location
    Bangalore, India
    Posts
    727

    Getting column description

    Hi

    Have a look at the DBA_IND_COLUMNS

    Name Null? Type
    ------------------------------- -------- ----
    OWNER NOT NULL VARCHAR2(30)
    TABLE_NAME NOT NULL VARCHAR2(30)
    COLUMN_NAME NOT NULL VARCHAR2(30)
    DATA_TYPE VARCHAR2(9)
    DATA_LENGTH NOT NULL NUMBER
    DATA_PRECISION NUMBER
    DATA_SCALE NUMBER
    NULLABLE VARCHAR2(1)
    COLUMN_ID NOT NULL NUMBER
    DEFAULT_LENGTH NUMBER
    DATA_DEFAULT LONG
    NUM_DISTINCT NUMBER
    LOW_VALUE RAW(32)
    HIGH_VALUE RAW(32)
    DENSITY NUMBER
    NUM_NULLS NUMBER
    NUM_BUCKETS NUMBER
    LAST_ANALYZED DATE
    SAMPLE_SIZE NUMBER


    From this table you will get column definition for any tables as a single table or a group of tables. Hope this solve your issue..

    Regards
    Thomas Saviour(royxavier@yahoo.com)
    Technical Lead (Databases)
    Thomson Reuters (Markets)

    http://ora600tom.wordpress.com/

  9. #9
    Join Date
    Jan 2003
    Posts
    78
    To get the DDL statements for tables, indexes, constraints, and views you can export the database and then import with indexfile parameter and the file (which you specify for above parameter) will have all create statements. For PL/SQL objects you can query [ALL|DBA|USER_SORUCE] views.

    Another option is to use script (shell script or sql script) to generate create statements for all objects in the database.
    HTH.
    Shripad Godbole
    OCP DBA (8,8i,9i)

    "Let's document it and call it a feature."

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