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

How many types of primary keys are there?

0 Answers  


How do you modify a trigger?

0 Answers  


What is union?

0 Answers  


Is it possible to use LONG columns in WHERE clause or ORDER BY?

3 Answers  


What is dense_rank?

0 Answers  






What are the types of variables use in pl sql?

0 Answers  


When sql appeared?

0 Answers  


What does rownum mean in sql?

0 Answers  


What is varchar used for?

0 Answers  


What is sql analyzer?

0 Answers  


in sql table follw columns r their vehicle_no|servicetype|date|location| 1234 |1FS |1-JAN|PUNE| 4561 |2FS |5-JAN|PUNE| 1234 |PS |7-JAN|PUNE| 1234 |PS |15-JAN|MUMB| i want o/p below vehicleno|1fs|1fsdate|1fslocation|1ps|1PSDATE|1PSLOC|2PS|2PS DATE|2PSLOCA e.g 1234|1FS|1JAN|PUNE|1PS|7JAN|PUNE|2PS|15JAN|MUMBAI PLS help me out to execute using sql query

1 Answers  


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

0 Answers  


Categories