1:create sequence 名字 START WITH 1 INCREMENT BY 1;
oracle序列不支持直接修改当前值,我们可以采用如下方式修改序列的值:
修改这个序列的increment,然后做一次select,然后再把increment 修改回来:
select seq.nextval from dual;
alter sequence seq increment by 79;
select seq.nextval from dual;
SQL> alter sequence seq increment by 1;
序列已更改。
SQL> select seq.nextval from dual;
NEXTVAL