Oracle 还原序列
declaren number(10);tsql varchar2(100);beginselect SEQ_APP_INFO_ADBIT_ID.nextval into n from dual;n:=-(n-1);tsql:= 'alter sequence SEQ_APP_INFO_ADBIT_ID increment by '|| n;execute immediate tsql;select SEQ_APP_INFO_ADBIT_ID.nextval into n from dual;tsql:= 'alter sequence SEQ_APP_INFO_ADBIT_ID increment by 1 ';execute immediate tsql;end;
?