What is mutating trigger?How to avoid it??

Answers were Sorted based on User's Feedback



What is mutating trigger?How to avoid it??..

Answer / surendra reddy

Mutaing error happens with triggers. It occurs because the
trigger is trying to update a row it is currently using.
The usual fix involves either use of views or temporary
tables so the database is selecting from one while updating
the other.

Is This Answer Correct ?    13 Yes 4 No

What is mutating trigger?How to avoid it??..

Answer / muthukumar

In trigger when selection and insertion or updation in same
table that time the MUTATING TRIGGER occurs.
U CAN AVOID THAT PROBLEM USE Autonomous transactions .

Is This Answer Correct ?    7 Yes 2 No

What is mutating trigger?How to avoid it??..

Answer / megha bidve

Use autonomous transactions because is it we can use commit
inside the trigger.

Autonomous transactions allow you to leave the context of
the calling transaction, perform an independant
transaction, and return to the calling transaction without
affecting it's state. The autonomous transaction has no
link to the calling transaction, so only commited data can
be shared by both transactions.

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

What are the two types of cursors in pl sql?

0 Answers  


What is left join in postgresql?

0 Answers  


write a query filter the null value data following source? name age john 30 smith null null 24 sharp 35 i want output name age john 30 sharp 35

1 Answers   TCS,


How many types of triggers are there in pl sql?

0 Answers  


What is the maximum rows in csv?

0 Answers  






What will be the output of the following String S = 1+2+"abc" S = ? String S1 = 1+2+"abc"+5+6 S1 = ?

1 Answers   ABC,


If a cursor is open, how can we find in a pl/sql block?

0 Answers  


What is the use of double ampersand (&&) in sql queries? Give an example

0 Answers  


define join and explain different type of joins? : Sql dba

0 Answers  


Is hadoop a nosql?

0 Answers  


What is sql and also describe types of sql statements?

0 Answers  


What is type and rowtype in pl sql?

0 Answers  


Categories