例如:
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
本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/p/3663376.html,如需转载请自行联系原作者