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 last primary key assigned

Re: Retrieve the last primary key assigned

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Tue, 16 Aug 2005 19:38:31 +0100
Message-ID: <dhc4g157ohvl7ie2om9fp47a12e79040ts@4ax.com>


On 16 Aug 2005 11:31:45 -0700, "brightspot" <brightspot5_at_hotmail.com> wrote:

>After I do an insert to a table is there a way to retrieve the primary
>key that was assigned? I'm just blanking on this, but I'm sure there's
>a simple way. Is there something like:
>
>-- do an insert to myTable
>theLastNumber := myTable.getLastPrimaryKeyUsed

 Not after, but as part of the insert.

http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14261/returninginto_clause.htm#LNPLS01354

-- 
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Received on Tue Aug 16 2005 - 13:38:31 CDT

Original text of this message

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