解å³ORA-04091触åå¨/å½æ°ä¸è½è¯»å®ï¼éç¨oracleçèªæ²»äºå¡ã
举ä¾å¦ä¸ï¼
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!=ld_value.U_ID then
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;
温馨提示:内容为网友见解,仅供参考