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: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 17 Sep 2002 16:08:21 GMT
Message-ID: <3D87533F.34F6A15@exesolutions.com>


eugene kim wrote:

> 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
>

Correct. but it can be stated more simply:

INSERT ... everything is new
DELETE  ... everything is old
UPDATE ... old is original record ... new is the updated version of the
record

Daniel Morgan Received on Tue Sep 17 2002 - 11:08:21 CDT

Original text of this message

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