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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Retrieve the Inserted Key in a after insert trigger

Re: Retrieve the Inserted Key in a after insert trigger

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 24 Aug 2003 17:19:31 +0200
Message-ID: <vkhme76hfvf962@corp.supernews.com>

"Guy Van Rinsveld" <guyvanrinsveld_at_hotmail.com> wrote in message news:3f48ce81$0$26208$ba620e4c_at_reader1.news.skynet.be...
> How to know the key which has been inserted in the After-Insert trigger ?
> Some update are to be done on this new record.
> I remember the CURRVAL.
> But will it be always the corresponding generated key given by this way?
>
>

Assuming you are on 8i or higher -which you don't mention, but always should- use the returning clause of the insert statement

-- 
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Sun Aug 24 2003 - 10:19:31 CDT

Original text of this message

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