What is mutating trigger?How to avoid it??
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
How many types of primary keys are there?
How do you modify a trigger?
What is union?
Is it possible to use LONG columns in WHERE clause or ORDER BY?
What is dense_rank?
What are the types of variables use in pl sql?
When sql appeared?
What does rownum mean in sql?
What is varchar used for?
What is sql analyzer?
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
what are the t string functions available in tsql? : Transact sql