ORACLE: sequence修改start值的说明
SQL> alter sequence seq_abc start with 1;
alter sequence seq_abc start with 1
*
ERROR at line 1:
ORA-02283: cannot alter starting sequence number
SQL> alter sequence seq_abc start with 1;
alter sequence seq_abc start with 1
*
ERROR at line 1:
ORA-02283: cannot alter starting sequence number
SQL> alter sequence seq_abc maxvalue 6 cycle nocache
Sequence altered.
SQL> select seq_abc.nextval from dual;
NEXTVAL
----------
6
SQL> /
NEXTVAL
----------
1
备注: 只能使用变通的方法来实现(在不删除序列重建的情况下)
探讨了在Oracle中修改序列start值时遇到的问题及解决方法,通过实例演示了变通实现方式。
367

被折叠的 条评论
为什么被折叠?



