如果想更新一个序列的start with值,是不可以直接更改的,会报错:

SQL> alter sequence seq_xxrs start with 1000;
 
alter sequence seq_xxrs start with 1000
 
ORA-02283: 无法变更启动序列号

那么,如何增加一个序列的值呢?可以采用更改increment by的方式更改:

1.更改increment为一个你想让序列增加到的值

alter sequence seq_xxrs increment by 1000;

2.执行一次查询序列的语句

select seq_xxrs.nextval from dual;

3.然后将increment改回来

alter sequence seq_xxrs increment by 1;

此时的序列的值就增大了。

 

 

如需转载,请注明出处:http://blog.csdn.net/nanaranran/article/details/17398591

 

相关文章:

  • 2021-08-26
  • 2021-05-06
  • 2021-12-14
  • 2021-11-09
  • 2021-06-19
  • 2022-01-19
  • 2022-12-23
  • 2021-06-12
猜你喜欢
  • 2021-07-08
  • 2021-10-17
  • 2021-06-14
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案