如何在oracle sql develop 的sequences中修改last_number值

2024-12-22 16:14:58
推荐回答(3个)
回答1:

算出当前值,和你要修改的值的差(正负都可以)假设为 100

alter sequence SEQ_name increment by 100 nocache;
select SEQ_name.nextval from dual;
alter sequence SEQ_name increment by 1 cache 20;

回答2:

select LAST_NUMBER from all_sequences where sequence_name='SEQ_'
UPDATE all_sequences SET LAST_NUMBER = where sequence_name='SEQ_'
未测试

回答3:

删除后重新建