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...

how instead of triger is helpful for mutating tables errors
handlling ?

Answer Posted / guru

"Mutating" means "changing". A mutating table is a table
that is currently being modified by an update, delete, or
insert
statement. When a trigger tries to reference a table that is
in state of flux (being changed), it is considered
"mutating" and
raises an error since Oracle should not return data that has
not yet reached its final state.
Another way this error can occur is if the trigger has
statements to change the primary, foreign or unique key
columns of the
table off which it fires. If you must have triggers on
tables that have referential constraints, the workaround is
to enforce the
referential integrity through triggers as well.
There are several restrictions in Oracle regarding triggers:
• A row-level trigger cannot query or modify a
mutating table. (Of course, NEW and OLD still can be
accessed by the
trigger) .
• A statement-level trigger cannot query or modify a
mutating table if the trigger is fired as the result of a
CASCADE delete.

So some time we can not use triggers to put DMl operations
on table. that time we can use INSTEAD OF TRIGGER.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is rename command in sql?

953


What is a delimiter in sas?

981


How many times can we commit in a loop?

958


What is a table partition?

1038


What is set serveroutput on in pl sql?

1200


Why is stored procedure faster than query?

909


Why is sql*loader direct path so fast?

1054


Can a foreign key be a duplicate?

859


What is varchar example?

975


What is delimiter in pl sql?

992


What is the difference between explicit and implicit cursors in oracle?

999


What are types of exception?

876


What is type and rowtype in pl sql?

968


What are packages in pl sql and also explain its advantages?

962


How can we implement rollback or commit statement in a trigger?

981