oracle导出序列方法分析


方法一:

  SELECT ' CREATE SEQUENCE '||SEQUENCE_NAME|| ' INCREMENT BY '||

  INCREMENT_BY ||' START WITH '||LAST_NUMBER||' MAXVALUE '||

  MAX_VALUE ||'   CACHE '||CACHE_SIZE||' ORDER NOCYCLE ;'

  FROM user_SEQUENCES;

  结果类似:

  CREATE SEQUENCE ARTCOMMENT_SEQ INCREMENT BY 1 START WITH 341 MAXVALUE 999999999999999999999999999   CACHE 20 ORDER NOCYCLE ;

  CREATE SEQUENCE ARTICLEVISTCECOLLECT_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 999999999999999999999999999   CACHE 20 ORDER NOCYCLE ;

  CREATE SEQUENCE ARTICLEVISTTEMP_SEQ INCREMENT BY 1 START WITH 82989 MAXVALUE 999999999999999999999999999   CACHE 20 ORDER NOCYCLE ;

  CREATE SEQUENCE ARTICLEVIST_SEQ INCREMENT BY 1 START WITH 1675 MAXVALUE 999999999999999999999999999   CACHE 20 ORDER NOCYCLE ;

  CREATE SEQUENCE ARTICLE_SEQ INCREMENT BY 1 START WITH 1908 MAXVALUE 999999999999999999999999999   CACHE 20 ORDER NOCYCLE ;

  方法二:

  select dbms_metadata.get_ddl('SEQUENCE',u.object_name) from user_objects u where object_type='SEQUENCE'

  结果类似:

  CREATE SEQUENCE "MO_VO"."ARTCOMMENT_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 341 CACHE 20 ORDER NOCYCLE ;

  CREATE SEQUENCE "MO_VO"."ARTICLEVISTCECOLLECT_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 ORDER NOCYCLE ;

  CREATE SEQUENCE "MO_VO"."ARTICLEVISTTEMP_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 82989 CACHE 20 ORDER NOCYCLE ;

  CREATE SEQUENCE "MO_VO"."ARTICLEVIST_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1675 CACHE 20 ORDER NOCYCLE ;



相关阅读:
asp.net GridView排序简单实现
初学者必读:精讲SQL中的时间计算语句
FSO一些代码
Oracle 动态视图
JSP过滤器实现---论坛不文明语过滤功能
IE和火狐中模仿Click事件及提交到新窗口总结(asp.net)
CSS教程:认真学习haslayout
如何有效利用系统中自带的记事本功能
关于 ASP 应用程序
javascript实现网页跳转的方法
vbs中实现启动两个应用程序,一直等到其中一个程序结束,然后关闭另一个?
JavaScript blog式日历控件新算法
php抓即时股票信息
SqlServer 序号列的实现方法
快速导航

Copyright © 2016 phpStudy | 皖ICP备18014864号-4