Home > Database > Mysql Tutorial > oracle如何设置序列当前值

oracle如何设置序列当前值

WBOY
Release: 2016-06-07 15:46:11
Original
2605 people have browsed it

修改这个序列的increment,然后做一次select,然后再把increment 修改回来 : SQL select seq.nextval from dual; NEXTVAL ---------- 21 SQL alter sequence seq increment by 79; 序列已更改。 SQL select seq.nextval from dual; NEXTVAL ---------- 100

修改这个序列的increment,然后做一次select,然后再把increment 修改回来

SQL> select seq.nextval from dual;

NEXTVAL
----------
21

SQL> alter sequence seq increment by 79;

序列已更改。


SQL> select seq.nextval from dual;

NEXTVAL
----------
100

SQL> alter sequence seq increment by 1;

序列已更改。

SQL> select seq.nextval from dual;

NEXTVAL
----------
101

SQL>



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template