Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Retrieve the last primary key assigned
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.
-- Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis toolReceived on Tue Aug 16 2005 - 13:38:31 CDT