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

how would you enter characters as hex numbers? : Sql dba

739


What is the use of sqldataadapter?

719


What is rename command in sql?

687


How do I pipe the output of one isql to another?

733


Can we insert delete data in view?

748


What is an index? What are the types of indexes? How many clustered indexes can be created on a table?

748


what are the t string functions available in tsql? : Transact sql

758


How to know the last executed procedure?

830


What are the advantages of sql? Explain

858


How many types of sql are there?

745


Is left join same as join?

752


What is the sql*loader? : aql loader

795


What are the advantages of sql?

795


What programs use sql?

754


how do you login to mysql using unix shell? : Sql dba

761