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;
相關文章
相關標籤/搜索