Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Last primary key value generated by an INSERT

843854Jan 24 2003 — edited Jan 24 2003
Hi,

When i execute a query like this with JDBC :

INSERT INTO ...

I would like to get the values generated by the query (for the primary key). This value is automatically generated by an index in a PostgreSQL DB.

I know that this can be performed in PHP by the pg_insert_id() command, so i want to know if there is an equivalent in Java/JDBC.

Thanks.

---
Eric MINSO

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2003
Added on Jan 24 2003
2 comments
133 views