修改一个oracle序列的当前值

来源:互联网 发布:c语言指令大全 编辑:程序博客网 时间:2024/05/21 15:46

declare
   LastValue integer;
begin
   loop
select SEQ_CONTRACT.currval into LastValue from dual;
    exit when LastValue >= 160 - 1; ---- 160是设置的值
    select SEQ_CONTRACT.nextval into LastValue from dual;
   end loop;
end;

原创粉丝点击