Home » SQL & PL/SQL » SQL & PL/SQL » Updating rows in a trigger
Updating rows in a trigger [message #8609] Wed, 03 September 2003 19:43 Go to next message
Derren Seah
Messages: 6
Registered: September 2003
Junior Member
Is there a way to fire an after-update table trigger after a commit has been done on a table?

If I try to modify a row that is the subject of a trigger, I get an error because the row has been modified but not committed. The error is : ORA-04091 table name is mutating, trigger/function may not see it.

If I put a commit in a trigger (even in a subprocedure) I get the following error: ORA-04092 cannot COMMIT or ROLLBACK in a trigger.

Basically I want to modify a row that is the subject of an after-update trigger.
Re: Updating rows in a trigger [message #8612 is a reply to message #8609] Thu, 04 September 2003 01:02 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Search the forum for mutating tables, this is a known issue in the Oracle world. More than once an excellent solution has been proposed. If you'd search http://asktom.oracle.com for "mutating tables", you'd get a real good explanation about when this is occurring and why.

MHE
Previous Topic: The number of a row inside a table (without ROWNUM)
Next Topic: Re: New - Not using Oracle Reporting Tools - Need Help Please
Goto Forum:
  


Current Time: Fri Apr 19 20:19:42 CDT 2024