Results 1 to 2 of 2

Thread: table structure

  1. #1
    Join Date
    May 2009
    Posts
    26

    Exclamation Unanswered: table structure

    how to create a script to show table names and strcutures for examples. Extracting information on many tables not just one table. Help me please

    EMP

    Name Null? Type
    ----------------------------------------- -------- ---------
    EMPNO NOT NULL NUMBER(4)
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)

  2. #2
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    spool this output to a file .. you might want to set headings off, trimspool on ... etc ....

    SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)
    FROM USER_ALL_TABLES u
    WHERE u.nested='NO'
    AND (u.iot_type is null or u.iot_type='IOT');

Posting Permissions

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