日期:2014-05-16 浏览次数:20818 次
-- Create sequence
create sequence PROGRESS_ID_SEQUENCE
minvalue 1
maxvalue 99999999
start with 1
increment by 1
cache 20;
create or replace trigger lckz_progress_id_trigger
before insert on issscandata.LCKZ_PROGRESS /*触发条件:当向表dectuser执行插入操作时触发此触发器*/
for each row /*对每一行都检测是否触发*/
begin /*触发器开始*/
select issscandata.progress_id_sequence.nextval into :new.progress_id from dual; /*触发器主题内容,即触发后执行的动作,在此是取得序列dectuser_tb_seq的下一个值插入到表dectuser中的userid字段中*/
end;