oracle 简单触发器
代码
create or replace trigger trig_cas_stu
before insert or update or delete
on xsjwxxl
for each row
begin
if inserting then
insert into cas_stu_scjx(cid) values(:NEW.xsjwxxl_id) ;
elsif deleting then
delete from cas_stu_scjx where cid=:OLD.xsjwxxl_id;
end if;
end;
为xsjwxxl表建了一个简单的触发器,在增加和删除是对cas_stu_scjx同时增加和删除。