ORA-04091: 表 COMPANY 發(fā)生了變化, 觸發(fā)器/函數(shù)不能讀它。 create or replace trigger TR_U_ID_SYNCH before update on COMPANY referencing old as old_value new as new_value
for each row declare tId company.id%type; PRAGMA AUTONOMOUS_TRANSACTION; begin if :new_value.U_ID is not null and :new_value.U_ID!= ![]() select t.t_id into tId from company t where t.id= :new_value.U_ID; :new_value.P_ID :=:new_value.U_ID; :new_value.T_ID :=tId; end if; COMMIT; end TR_CO_GB_ID_SYNCH; |
|
來自: aaie_ > 《OracleDayDayUp》