Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: get id after insert
Is the ID sequence generated? If so, you can do this:
SELECT id.CURRVAL
FROM dual;
buurd_at_my-deja.com wrote:
> Hi!
> I'd often have to get the id (triggergenerated) from a table for the
> row i just inserted. I'd hope there is a better solution than asking
> for the max(id).
>
> Tia
>
> --
> Roland Carlsson
> Certified Java programmer
> Skövde
> Sweden
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Dec 21 1999 - 23:02:50 CST
![]() |
![]() |