Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: OLD NEW value in trigger ?

Re: OLD NEW value in trigger ?

From: Marcin Zawadzki <marcinz_at_kompakt.pl>
Date: Tue, 17 Sep 2002 17:50:58 +0200
Message-ID: <am7j0j$gkv$1@news2.tpi.pl>

> i have another question about 'mutating table'
> in before insert trigger on A
> i had select count(*) from A where A.col = :new.col;
> which generated 'mutating table' error
> and i changed it to where i use before/after trigger and package
> select count(*) from A where A.col = frompackage.col;
> and this one worked.
>
> so 'mutating table' error wasn't raised by 'querying on A'
> what's going on here?
>
> thanks a lot in advance

in row triger you cannot use select.

if you have too, store all needed values in temporary table (row triger), and then launch select from statement trigger.

MZ Received on Tue Sep 17 2002 - 10:50:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US