韩国三角电视剧相认:表 发生了变化, 触发器/函数不能读它

来源:百度文库 编辑:九乡新闻网 时间:2024/04/30 06:01:01
 
ORA-04091: 表 COMPANY 发生了变化, 触发器/函数不能读它。
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;