Oracle 重置排序 SEQUENCE

DROP SEQUENCE WPP_ID_SEQ

CREATE SEQUENCE WPP_ID_SEQ INCREMENT BY 1 START WITH 1;

declare
  i   number; j number;
begin
  i:= 0;  j:= 0;
  loop
    i := i + 1;
    select WPP_ID_SEQ.Nextval into j from dual;
  exit when i = 3502 ;
  end loop;
end;

select WPP_ID_SEQ.Nextval from dual

你可能感兴趣的:(sequence)