create or replace trigger trig_mut
before insert on emp10
for each row
begin
insert into emp10(empno,sal) values (:new.empno,:new.sal);
end;
/
Trigger created.
SQL> insert into emp10 select * from emp;
insert into emp10 select * from emp
*
ERROR at line 1:
ORA-04091: table SCOTT.EMP10 is mutating, trigger/function may not see it
ORA-06512: at "SCOTT.TRIG_MUT", line 2
ORA-04088: error during execution of trigger 'SCOTT.TRIG_MUT'
No comments:
Post a Comment