标签:blog ar sp div art log bs as tt
1.用存储过程让myseq序列归0
declare n number(10); tsql varchar2(100); begin select MYSEQ.nextval into n from dual; n:=-(n-1); tsql:=‘alter sequence MYSEQ increment by‘|| n; execute immediate tsql; select MYSEQ.nextval into n from dual; tsql:=‘alter sequence MYSEQ increment by 1‘; execute immediate tsql; end; /
2.重建序列
drop sequence seq_name; create sequence seq_name start with 0 minvalue 0
标签:blog ar sp div art log bs as tt
原文地址:http://www.cnblogs.com/yc12/p/4122083.html