Re: Trigger Problems

From: Dave Mausner <d-mausner_at_nwu.edu>
Date: 1995/05/06
Message-ID: <3ofshj$f0a_at_news.acns.nwu.edu>#1/1


In article <Homoky#m#_Steven_R-0505951239170001_at_moke.aai.arco.com>, Homoky#m#_Steven_R_at_msmail.aai.arco.com says...
>I'm having troubles with the below trigger and was hoping someone
>could give me some assitance.
>1) First, I created the following table.
>CREATE TABLE WELL_OPT_BASE
>2) Second, I created the following trigger
>CREATE OR REPLACE TRIGGER WELL_OPT_CORR_TRIGGER
>3) Third, when I update the table with the following command
>UPDATE WELL_OPT_BASE
>4) Error messages:
>UPDATE WELL_OPT_BASE
>ORA-04091: table WELL_OPT_BASE is mutating, trigger/function may not see it
it's a limitation: if you define a trigger on an update of table X then that trigger may not also update table X. however, since the context of a for-each row trigger is the row being updated, you can modify any column in the same row, and that is not a "mutation" error. you just cannot use UPDATE.

-- 
Dave Mausner, Sr. Consultant, Braun Technology Group, Chicago.
Received on Sat May 06 1995 - 00:00:00 CEST

Original text of this message