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: How to select the last item's ID

Re: How to select the last item's ID

From: Davide Bianchi <davidebianchi_at_davidebianchi.net>
Date: Tue, 4 Sep 2001 15:08:04 +0200
Message-ID: <9n2jo1$4scm0$1@ID-18487.news.dfncis.de>


"David Lee" <pritino2020_at_yahoo.com.tw> wrote in message news:9n2i6h$2n5t1$1_at_news.shem.etwebs.com...
> After I inserted a row of data, how do I retrieve the
> auto-increment ID of this row ?

If you are using a SEQUENCE, you just ask for the NEXT value of the sequence and then use that as ID for your table (so, there is no automatic insertion). Otherwise, you can use a Stored Procedure that insert the data and return the generated ID.

Davide Received on Tue Sep 04 2001 - 08:08:04 CDT

Original text of this message

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