Explain what is mutation and what is mutating table and how this mutation problem is solved in a table

Showing Answers 1 - 4 of 4 Answers

Sailesh

  • May 2nd, 2006
 

Mutation  happens in case of triggers. A 'Mutating table'  is a table which is being updated by Insert , update or delete triggers.It can also be a table which is being updated when delete cascade is run.   

Mutation occurs when a trigger is trying to update a row which it is using currently. To solve this either we have to use intermediate table or a view so that it can choose from one while updating  the other. 

  Was this answer useful?  Yes

Shefali

  • Aug 16th, 2006
 

just to add...you can avoid mutation by using autonomous transaction pragma

  Was this answer useful?  Yes

Nasim

  • Aug 24th, 2007
 

One solution also exist:

create a row level trigger and insert/update the data and take it in collections( varray or nested table or associative array). Then write a after statement level trigger and fetch that data.

  Was this answer useful?  Yes

Nicsmart

  • Mar 31st, 2010
 

A mutating table is a table that is currently being modified by an INSERT,UPDATE,DELETE statement or a table that might need to be updated by the effects of a declarative DELETE CASCADE referential integrity action. A table is not considered mutating for statement triggers. The triggered table is itself is a mutating table as well as any table referencing it with FOREIGN KEY constraint. This restriction prevents a row trigger from seeing an inconsistent set of data

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions