1. 程式人生 > >oracle中創建sequence指定起始值

oracle中創建sequence指定起始值

The creat with start BE div reat AS end

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;
/

  

oracle中創建sequence指定起始值