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 are the topics in pl sql?

605


How do you write a complex sql query?

685


How do you rank data in sql?

597


What does pl sql developer do?

604


Can we connect to postgresql using sql developer?

579






What is the process of copying data from table a to table b?

699


Which software is used for pl sql programming?

609


How to add, remove, modify users using sql?

654


what is schema? : Sql dba

642


What are different types of keys?

627


Can I join the same table twice?

637


What are the types of dbms?

628


what is a trigger? : Sql dba

654


What are the types of operators available in sql?

668


How many types of privileges are available in sql?

849