› Fóruns › Banco de dados Oracle › Coluna auto incremento? › Coluna auto incremento?
27 de novembro de 2009 às 10:36 pm
#91207
Participante
Olá,
Eu uso o código:
alter sequence increment by nocache;
select .nextval from dual;
alter sequence increment by 1 nocache;
declare
LastValue integer;
begin
loop
select .currval into LastValue from dual;
exit when LastValue >= - 1;
select .nextval into LastValue from dual;
end loop;
end;
/
alter sequence increment by 1 nocache;
[]s Ishii