dbms_metadata.get_ddl( 'TABLE', 'TABLENAME' ) : dbms_metadata « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL> create table t
  2  ( x int primary key,
  3    y date,
  4    z clob
  5  )
  6  /

Table created.

SQL> select dbms_metadata.get_ddl( 'TABLE', 'T' ) from dual;

DBMS_METADATA.GET_DDL('TABLE','T')
--------------------------------------------------------------------------------

  CREATE TABLE "JAVA2S"."T"
   (    "X" NUMBER(*,0),
        "Y" DATE,
        "Z" CLOB,
         P


SQL>
SQL>
SQL>
SQL> drop table t;

Table dropped.

SQL>








31.15.dbms_metadata
31.15.1.dbms_metadata.get_ddl( 'TABLE', 'TABLENAME' )
31.15.2.dbms_metadata.get_xml