|
Home > Archive > Other Oracle database topics > August 2005 > Retrieve the last primary key assigned
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Retrieve the last primary key assigned
|
|
| brightspot 2005-08-16, 8:23 pm |
| 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. getLastPrimaryKeyUse
d
Thanks for helping me in this probably silly question,
Chris
| |
| Andy Hassall 2005-08-16, 8:23 pm |
| On 16 Aug 2005 11:31:45 -0700, "brightspot" <brightspot5@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. getLastPrimaryKeyUse
d
Not after, but as part of the insert.
http://download-uk.oracle.com/docs/....htm#LNPLS01354
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
| |
| brightspot 2005-08-16, 8:23 pm |
| Thanks! I knew I was missing something.
|
|
|
|
|