时间:2021-07-01 10:21:17 帮助过:39人阅读
修改后:
create or replace trigger tri_app1_mstr_upd before update on app1_mstr for each row begin if updating then if :new.app_hardware = 0 and :old.app_hardware = 1 then :new.app_1_dept := ‘‘; :new.app_1_mgr1 := ‘‘; :new.app_1_summary := ‘‘; :new.app_1_engineer1 := ‘‘; :new.app_1_engineer2 := ‘‘; :new.app_1_engineer3 := ‘‘; delete from appd6_det where appd6_flow = :old.app_flow; end if; if :new.app_structure = 0 and :old.app_structure = 1 then :new.app_2_dept :=‘‘; :new.app_2_mgr1 :=‘‘; :new.app_2_summary :=‘‘; :new.app_2_engineer1 :=‘‘; :new.app_2_engineer2 :=‘‘; :new.app_2_engineer3 :=‘‘; delete from appd7_det where appd7_flow = :old.app_flow; end if; if :new.app_software = 0 and :old.app_software = :old.app_flow then :new.app_3_dept :=‘‘; :new.app_3_mgr1 :=‘‘; :new.app_3_summary :=‘‘; :new.app_3_engineer1 :=‘‘; :new.app_3_engineer2 :=‘‘; :new.app_3_engineer3 :=‘‘; delete from appd8_det where appd8_flow = :old.app_flow; end if; if :new.app_other = 0 and :old.app_other = 1 then :new.app_4_dept :=‘‘; :new.app_4_mgr1 :=‘‘; :new.app_4_summary :=‘‘; :new.app_4_engineer1 :=‘‘; :new.app_4_engineer2 :=‘‘; :new.app_4_engineer3 :=‘‘; delete from appd9_det where appd9_flow = :old.app_flow; end if; if :new.app_module = 0 and :old.app_module = 1 then :new.app_5_dept :=‘‘; :new.app_5_mgr1 :=‘‘; :new.app_5_summary :=‘‘; :new.app_5_engineer1 :=‘‘; :new.app_5_engineer2 :=‘‘; :new.app_5_engineer3 :=‘‘; delete from appd12_det where appd12_flow = :old.app_flow; end if; end if; end tri_app1_mstr_upd;View Code
Oracle:无法更改此触发器类的New值
标签:时报 display acl 分享 new src view 今天 技术