Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Getting primary key right after insertion into the record

Getting primary key right after insertion into the record

From: Jump.Net <darwin_ling_at_hotmail.com>
Date: Fri, 15 Sep 2000 10:23:35 -0500
Message-ID: <8ptego$92m$1@news.jump.net>

How do I obtain the primary key ID right after a record is inserted in Oracle?

Such primary key is generated by trigger/sequence. And I am doing it within a Java JDBC environment

And this has to work in a multithreaded environment.

I thought about using

select max(id) from table

right after the insert.

Would this be the best way? Received on Fri Sep 15 2000 - 10:23:35 CDT

Original text of this message

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