Hi all,

One way to generate a primary key, insert a new row and retrieve the
generated key in one call is to use the following SQL sentence (at leat
in a Oracle database):

INSERT INTO emp VALUES (empseq.nextval, 'LEWIS', 'CLARK') RETURNING id
INTO :bnd1

How do I read the binding variable (:bnd1) that contains my primary key
(from column "id") from java? Will the binding variable be presented in
the resultset like:

primaryKey = rs.getInt(bnd1)

or how do I get the value from the Returning clause?

If somebody wonder why I don't test it myself it's because I don't have
access to a development environment right now


// Dennis

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to