熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

oracle單獨導出序列方法

2022-06-13   來源: 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 ;


From:http://tw.wingwit.com/Article/program/Oracle/201311/18895.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.