dbms_metadata.get_ddl( 'TABLE', 'TABLENAME' )
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>
Related examples in the same category