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