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 are multiple column = value pairs delimited in the SET clause of an UPDATE statement? 1. With commas (SET price = 0, status = 'I') 2. With parentheses (SET (price = 0) (status = 'I')) 3. With double-pipes (SET price = 0 || status = 'I') 4. With square-brackets (SET [price = 0] [status = 'I'] 5. With single or multiple spaces (SET price = 0 status = 'I')
when normalization is required
What are sql ddl commands?
Write one update command to update seqno field of a table on the basis of row number.
Can you join a table to itself?
Question: Below is the table city gender name delhi male a delhi female b mumbai male c mumbai female d delhi male e I want the o/p as follows: male female delhi 2 1 mumbai 1 1 Please help me in writing the query that can yield the o/p mentioned above?
How do I install microsoft sql?
What is difference between db2 and sql?
Which one is better subquery or joins?
What is intersect?
What is a call statement? Explain with an example.
i need department wise top 2 employees salary.which logic i will use