New records for Oracle sequence Loops

Source: Internet
Author: User

Share a little bit of experience:

Seq_bos_t_priv_function is a sequence, and colnum1 is the primary key.
Insert into Table1 (colnum1, colnum2) values ('select seq_bos_t_priv_function.nextval from dual', '1 ');
Insert into Table1 (colnum1, colnum2) values ('select seq_bos_t_priv_function.nextval from dual', '1 ');
You can add records cyclically in the database without the need of a program!

Sequence Import and Export

1. Run the following SQL statement: sequence_owner = 'database login username ';

Select 'create sequence username. '| sequence_name | 'minvalue' |
Min_value | 'maxvalue' | max_value | 'start with' |
Last_number | 'crement by '| increment_by | 'cache' |
Cache_size | ';'
From dba_sequences
Where sequence_owner = 'drug ';

2. After execution, all sequences of the corresponding users are identified.

3. Don't talk about it. Just execute SQL directly.

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.