如果想更新一个序列的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;

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

 

相关文章:

  • 2021-12-29
  • 2021-10-17
  • 2021-06-14
  • 2021-10-15
  • 2022-02-08
  • 2021-10-14
  • 2021-10-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案