数据库

位置:IT落伍者 >> 数据库 >> 浏览文章

oracle单独导出序列方法


发布日期:2022年06月17日
 
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 START WITH MAXVALUE CACHE ORDER NOCYCLE ;

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

CREATE SEQUENCE ARTICLEVISTTEMP_SEQ INCREMENT BY START WITH MAXVALUE CACHE ORDER NOCYCLE ;

CREATE SEQUENCE ARTICLEVIST_SEQ INCREMENT BY START WITH MAXVALUE CACHE ORDER NOCYCLE ;

CREATE SEQUENCE ARTICLE_SEQ INCREMENT BY START WITH MAXVALUE CACHE ORDER NOCYCLE ;

方法二:

select dbms_metadataget_ddl(SEQUENCEuobject_name) from user_objects u where object_type=SEQUENCE

结果类似:

CREATE SEQUENCE MO_VOARTCOMMENT_SEQ MINVALUE MAXVALUE INCREMENT BY START WITH CACHE ORDER NOCYCLE ;

CREATE SEQUENCE MO_VOARTICLEVISTCECOLLECT_SEQ MINVALUE MAXVALUE INCREMENT BY START WITH CACHE ORDER NOCYCLE ;

CREATE SEQUENCE MO_VOARTICLEVISTTEMP_SEQ MINVALUE MAXVALUE INCREMENT BY START WITH CACHE ORDER NOCYCLE ;

CREATE SEQUENCE MO_VOARTICLEVIST_SEQ MINVALUE MAXVALUE INCREMENT BY START WITH CACHE ORDER NOCYCLE ;

上一篇:减少ORACLE中的磁盘I/O

下一篇:Oracle正则表达式小试用