Two Methods for separately exporting sequences using Oracle

Source: Internet
Author: User

Method 1:

Select 'create sequence '| sequence_name | 'crement by' |

Increment_by | 'start with' | last_number | 'maxvalue' |

Max_value | 'cache' | cache_size | 'order nocycle ;'

From user_sequences;

The result is similar:

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;

Method 2:

Select dbms_metadata.get_ddl ('sequence ', U. object_name) from user_objects u where object_type = 'sequence'

The result is similar:

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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.