获取oracle的建表DLL语句

喜夏-厌秋 提交于 2019-12-09 22:47:53

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"

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!