方法一:
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 ;