不可以只导出导入序列修改序列next number:-- Modify the last number alter sequence S_TMP_UPDATEUSERPOSTRANK increment by -20 nocache; select S_TMP_UPDATEUSERPOSTRANK.nextval from dual; alter sequence S_TMP_UPDATEUSERPOSTRANK increment by 1 nocache; declare LastValue integer; begin loop select S_TMP_UPDATEUSERPOSTRANK.currval into LastValue from dual; exit when LastValue >= 1 - 1; select S_TMP_UPDATEUSERPOSTRANK.nextval into LastValue from dual; end loop; end; / alter sequence S_TMP_UPDATEUSERPOSTRANK increment by 1 cache 20;
alter sequence S_TMP_UPDATEUSERPOSTRANK increment by -20 nocache;
select S_TMP_UPDATEUSERPOSTRANK.nextval from dual;
alter sequence S_TMP_UPDATEUSERPOSTRANK increment by 1 nocache;
declare
LastValue integer;
begin
loop
select S_TMP_UPDATEUSERPOSTRANK.currval into LastValue from dual;
exit when LastValue >= 1 - 1;
select S_TMP_UPDATEUSERPOSTRANK.nextval into LastValue from dual;
end loop;
end;
/
alter sequence S_TMP_UPDATEUSERPOSTRANK increment by 1 cache 20;