oracle中创建sequence指定起始值

oracle中创建sequence指定起始值

DECLARE
V_Area_Id NUMBER;
BEGIN
SELECT MAX(T.Area_Id)+10 INTO V_Area_Id FROM T_PM_TankArea T;
if V_Area_Id is null THEN select 1 into V_Area_Id from dual;
END IF; EXECUTE IMMEDIATE
'create sequence S_PM_TankArea
minvalue 1
maxvalue 9999999999999999999999999999
start with ' || V_Area_Id
|| 'increment by 1
nocache';
end;
/

  

上一篇:BZOJ 1005 明明的烦恼(prufer序列+高精度)


下一篇:L2-029 特立独行的幸福 (25 分)