Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Retrieve the Inserted Key in a after insert trigger
"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 addressReceived on Sun Aug 24 2003 - 10:19:31 CDT
![]() |
![]() |