Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Autoincremented id - how do I read it after insert?
After you insert the record and use the sequence_name.nextval for the
id, you can get that value by querying sequence_name.currval.
HTH,
Brian
kev wrote:
>
> Hi,
>
> I have autoincremented id fields on several tables (using triggers and
> sequences).
> For some of them, I need to know the id value of the record I have just
> inserted, so that I can then insert a reference to that record in a
> 'link' table (resolved many-many links). What's the best way of doing
> this?
>
> TIA,
>
> kev
Received on Wed Sep 01 1999 - 16:05:47 CDT
![]() |
![]() |