When the mutating error will comes? and how it will be
resolved?
Answer Posted / pravin more
Mutating error in Trigger:-
When programmer create trigger and give table name abc and
in body if programmer is using same table abc for
selecting,updating,deleting,inserting then mutation occur.
ex.:-
create or replace trigger xyz
after
update
on abc
for each row
referencing :OLD as OLD :NEW as NEW
begin
select max(salary) from abc;
update abc
set location_id=:NEW.location_id
where dept_id=105;
end;
------------------------------------------------------------
In the above example you are updating same table which is
under transaction so mutation problem occur here.
Solution on this is
You can use Temporary table or Materialize view which can
solve above problem
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What are the types of dbms?
what are set operators in sql? : Sql dba
What is form and report?
what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql
What is database migration?
What is an implicit commit?
How does postgresql compare to oracle/db2/ms sql server/informix?
What is on delete set null?
what is commit? : Sql dba
What kind of join is join?
how can we submit a form without a submit button? : Sql dba
What is package in pl sql?
What is recursive stored procedure?
How do you rename a table in sql?
Do triggers have restrictions on the usage of large datatypes, such as long and long raw?