Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL: Mutating Table
In message <332C753C.48D4_at_qrcsun.qrc.org>
"Lun Wing San (Oracle)" <wslun_at_qrcsun.qrc.org> writes:
> Valentin Maier wrote:
> >
> > CREATE OR REPLACE TRIGGER article_FNAME
> > AFTER UPDATE OF FNAME ON mfs.article FOR EACH ROW
> > BEGIN
> > IF (:old.FNAME IS NOT NULL) THEN
> > INSERT INTO mfs.arttrans
(AN,DTUPDATE,OPERINIT,UPDATETYPE,UPDATEPROCESS)
> > VALUES (:old.AN,SYSDATE,:old.PRINIT,'C','A') ;
> > END IF ;
> > END ;
> >
> > When I try to update article.FNAME field, I get the error message:
> >
> > ERROR at line 1:
> > ORA-04091: table MFS.ARTICLE is mutating, trigger/function may not see it
> > ORA-06512: at "MFS.ARTICLE_FNAME", line 4
> > ORA-04088: error during execution of trigger 'MFS.ARTICLE_FNAME'
A possible way round the mutating table problem is to create a PL/SQL package that does all the required INSERT/UPDATE/DELETE stuff and call this from your trigger.
Regards,
Mark Killick
Received on Mon Mar 24 1997 - 00:00:00 CST
![]() |
![]() |