Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Mutating Table error - AFTER INSERT/UPDATE trigger
M Mueller wrote:
> Hello -
>
> I believe I posted this in the wrong ng before - sorry for the double
> post (if you noticed the other message).
>
> I'm using Oracle 8.1.7 and am running into the infamous mutating table
> error on an AFTER INSERT OR UPDATE FOR EACH ROW trigger. I have seen
> examples for getting around mutating table errors if you either need
> access to the :old or the :new values within a trigger. But what if
> you need access to both? Or is this even possible (I'm fairly new to
> triggers).
The mutating error has nothing to do with :OLD and/or :NEW. It has to do with putting a trigger on table_a that references table_a as you have done.
> ON table_a
> select count(*) into numofdocs from table_a
> Thanks so much,
> Melissa
You can't do that. And if you think you need to I'd suggest you sit down with a senior DBA or architect at your place of work and have them help you redesign what you are doing.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Tue Feb 24 2004 - 15:43:25 CST
![]() |
![]() |