Create Or Replace Trigger eTR_Employee_INT After INSERT ON eEmployee REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW Begin --人事部分 Insert Into edetails(EID) values(:New.EID); End ;
2、update触发器
Create Or Replace Trigger eTR_JobToComp_UPT Before update on ecd_jobtocomp Referencing new as new old as old for each row declare pragma autonomous_transaction; Begin update ecd_jobtocomp set jobid = :new.jobid where jobid = :old.jobid; commit; end;
根据字段来update:
create or replace trigger 触发器名 after update of 字段 on 表 for each row when (new.字段=条件)
3、DEL触发器
Create or replace Trigger eTR_JobToComp_DEL After Delete on ecd_jobtocomp Referencing new as new old as old for each row declare pragma autonomous_transaction; Begin Delete From ecd_jobtocomp where jobid = :old.jobid; commit; end;