proc_inst表执行insert行级触发的时候成了变异表,此时不能操作. 
create or replace trigger trig_name 
    before insert proc_inst
    for each row 
begin 
    select 'test' into :new.auth_name from dual;
end ;

解决方案 »

  1.   

    谢谢,不过还是提示出错:ORA-04084:无法更改此触发器类型的NEW值。
      

  2.   

    ORA-04091 table string.string is mutating, trigger/function may not see it  Cause A trigger (or a user defined PL/SQL function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.  
    Action Rewrite the trigger (or function) so it does not read that table.  
      

  3.   

    row level trigger中,不能包含该table自身的操作:select,insert,delete,update!!!
      

  4.   

    http://blog.csdn.net/zhpsam109/archive/2004/09/07/97335.aspx
      

  5.   

    谢谢dinya2003(OK),问题已经解决。
      

  6.   

    问题又出现了,在同一个表中访问:new.ENTR_SEND就没问题,但是访问:new.ENTR_RECI就会出错。提示值已经被改变。也就是下面的语句可以执行:
    select user_name into username from exmainframe.SYS_USER where user_code = :new.ENTR_SEND;而此语句会出错:
    select user_name into username from exmainframe.SYS_USER where user_code = :new.ENTR_RECI;
    触发器如下:CREATE OR REPLACE TRIGGER "EXFLOW".
        "TRG_RECI_ENTR_UPDATEUSERNAME" BEFORE INSERT 
        ON "RECI_ENTR" 
        FOR EACH ROW 
        declare username varchar2(50);
    begin  
        select user_name into username from exmainframe.SYS_USER where user_code = :new.ENTR_SEND;
        select username into :new.SEND_NAME from dual;    
        
        select user_name into username from exmainframe.SYS_USER where user_code = :new.ENTR_RECI;
        select username into :new.RECI_NAME from dual;
    end;