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 -> OLD NEW value in trigger ?

OLD NEW value in trigger ?

From: eugene kim <eugene1977_at_hotmail.com>
Date: Tue, 17 Sep 2002 14:12:07 +0000
Message-ID: <am6js3$edf$1@newsreader.mailgate.org>


i couldn't find documentation about this it's just my guess..
please correct me if i'm wrong..

before insert trigger
:new -> row which contains data being inserted
:old -> null

before update trigger
:new -> row which contains data being updated
:old -> row which already existed before update

before delete trigger
:new -> null
:old -> row which will be deleted

after insert trigger
:new -> row which has been inserted
:old -> null

after update trigger
:new -> row which was used to update
:old -> row which was in db before update

after delete trigger
:new -> null
:old -> row which was deleted

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 Received on Tue Sep 17 2002 - 09:12:07 CDT

Original text of this message

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