Possible Duplicate:
How to get the insert ID in JDBC?
I have the following tables:
customer(cid, ...)
book(cid, rid)
reservation(rid, ...)
I want to add a reservation in its table then I want to add in a relationship in book between customer and reservation.
How can I know rid while it is auto generated, and when I execute the query I did get a ResultSet returned?
The rid is auto generated form Oracle using a sequence and a trigger.