oracle 创建 递增序列 递增触发器

create or replace trigger DAILYPRODUCTT
before insert on DAILYPRODUCT
for each row
  
declare
  --local variables here
  begin
    select DAILYPRODUCTS.nextval into :new.id from sys.dual;

    end;




-- Create sequence 
create sequence DAILYPRODUCTS
minvalue 1
maxvalue 99999999
start with 21
increment by 1
cache 20;



你可能感兴趣的:(oracle 创建 递增序列 递增触发器)