oracle 自增ID

drop sequence SEQ_sys_dictionary;
create sequence SEQ_sys_dictionary INCREMENT BY 1 START WITH 1;

create or replace trigger sys_dictionary_TRIGGER       
before insert on sys_dictionary       
for each row       
begin       
select SEQ_sys_dictionary.nextval into :new.id from dual;      
end ; 
commit;

 

posted @ 2015-12-07 15:15  小さいです哥  阅读(167)  评论(0编辑  收藏  举报