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 synonyms?

570


What is sqlerrd?

524


Is pl sql useful?

537


What is blind sql injection?

572


how many triggers are allowed in mysql table? : Sql dba

556






What is a database event trigger?

593


Explain the components of sql?

587


i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5

3196


what is 'mysqlcheck'? : Sql dba

573


how can we destroy the cookie? : Sql dba

555


What is the use of non clustered index?

526


What is recursive stored procedure?

598


Why use stored procedures?

568


What is the difference between distinct and unique in sql?

468


What is pl/sql language case sensitive?

631