错误现象为:
The following error has occurred:ORA-04091: table EXTUSER.SN_PN is mutating, trigger/function may not see it
ORA-06512: at "EXTUSER.SN_PN_UPDATE", line 2
ORA-04088: error during execution of trigger 'EXTUSER.SN_PN_UPDATE'

解决方案 »

  1.   

    在触发器中不能修改出发它的表对sn_pn的修改设置了触发器,就不能再触发器中修改sn_pn
    ORA-04091 table string.string is mutating, trigger/function may not see itCause: 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.
      

  2.   

    create TRIGGER extuser.sn_pn_update
    before update on  sn_pn
      for each row
    begin
      :new.record_time:='sysdate' ;
    end sn_pn_update;
      

  3.   

    beckhambobo(beckham) 的改法不错啊
      

  4.   

    里面不能对自己使用update
    TRIGGER extuser.sn_pn_update
    before update on sn_pn
      for each row
    begin
     :new.recoder_time='sysdate';
    /*
    或用
    select sysdate into :new.recoder_time from daul;
    */
    end;