Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are its different types of dbms?

998


how to load data files into tables with 'mysqlimport'? : Sql dba

1091


Can we use ddl statements in stored procedure?

1138


Why stored procedure is faster than query?

1047


What are pl/sql cursors?

1045


What is sql*plus?

1068


how to select unique records from a table? : Sql dba

1105


what is the difference between char and varchar data types? : Sql dba

1085


How does index help in query performance?

1024


How can the performance of a trigger be improved?

1035


Can we insert data into materialized view?

938


difference between anonymous blocks and sub-programs.

1130


What is difference between ms sql and mysql?

956


What is pragma in sql?

1067


what are all the different types of indexes? : Sql dba

1043