oracle创建自增序列和触发器

创建自增序列
create sequence APP_SEQ
minvalue 1
maxvalue 999999
start with 1
increment by 1
nocache;
 
创建触发器
create or replace trigger APP_TRI
before insert on MMC_APP_BASE_INFO for each row
begin
select APP_SEQ.nextval into :new.appno from dual;
end;

posted @ 2019-05-21 09:34  芒果有毒  阅读(1988)  评论(0编辑  收藏  举报