查询表的DDL

例如:

SQL>create table tab001(id varchar(4));

 

SQL>select dbms_metadata.get_ddl(‘TABLE’,’tab001’) from dual;

---------------------

Object “tab001” not found in schema “SYS”

 

SQL>select dbms_metadata.get_ddl(‘TABLE’,TAB001’) from dual;

------------------------------

CREATE TABLE “SYS”.”TAB001”

(

   “ID” VARCHAR2(4)

) PCTFREE 10 PCTUSED 40

 

SQL>alter table tab001 modify id varchar(6);

 

SQL>select dbms_metadata.get_ddl(‘TABLE’,’TAB001’) from dual;

--------------------------------

CREATE TABLE “SYS”.”TAB001”

(

   “ID” VARCHAR2(6)

) PCTFREE 10 PCTUSED 40

posted @ 2014-04-14 10:01  健哥的数据花园  阅读(1642)  评论(0编辑  收藏  举报