get_ddl('TABLE','表名','实例名') from dual
select dbms_metadata.get_ddl('TABLE','RMS_CITY','RMS') from dual
结果
CREATE TABLE "RMS"."RMS_CITY" ( "INT_ID" NUMBER(*,0) NOT NULL ENABLE, "CITY_ID" NUMBER(*,0), "LONG_SECTION" VARCHAR2(10), "CITY_NAME" VARCHAR2(32) NOT NULL ENABLE, "SHORT_NAME" VARCHAR2(8), "STATEFLAG" NUMBER(*,0), "TIME_STAMP" DATE DEFAULT sysdate, "PROVINCE_NAME" NUMBER(*,0) ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "RMS_TABSPACE_1"
来源:https://www.cnblogs.com/yaoyangding/p/12013798.html