Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> id of last inserted row?
I've got a table with an autoincremented identifier, as
specified below (some cols truncated for brevity).
I do something like
insert into bar(name) values('mark');
and I would like to get back the id that was just inserted for me.
How can I do that?
Many TIA!
Mark
REM FOO BAR
CREATE TABLE "FOO"."BAR"
( "ID" NUMBER(20,0) NOT NULL ENABLE, "NAME" VARCHAR2(64 BYTE) NOT NULL ENABLE, CONSTRAINT "BAR_PK" PRIMARY KEY ("ID") ENABLE) ;
-- Mark Harrison Pixar Animation StudiosReceived on Tue Aug 01 2006 - 14:17:04 CDT
![]() |
![]() |