-
I am trying to update rows in a table which has a 'update trigger for each row', in the trigger I have code to update all other rows in the same table, but when it tries to update other rows I get the error.
ORA-04091: table name is mutating, trigger/function may not see it
-
You will have to have another trigger there - post update STATEMENT LEVEL trigger, which will not cause "mutating table error".
If in that trigger you have to know which rows have been processed in ROW LEVEL trigger then you must store those rowids somehow during execution of row level trigger. You can create a package and store rowids in packaged PL/SQL table or in 8i you can efficiently use GLOBAL TEMPORARY tables for that.
-
Thanks Jurij good idea I try that