Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> returning values from INSERT
Hi,
in SQL*PLUS I can declare bindvariables and use the in Statements like
"INSERT INTO tbl_test(col1,col2) VALUES (seq_test.nextval, 'Hello World')
RETURNING col1 INTO :bindvariable".
Is it somehow possible to do this with JDBC as well?
I am currently doing a workaround, that is not satisfying (at least for
me): I do 2 Statements, first I get the nextval fo the sequence second I
do the insert with the result of the first. That is not the way I want to
write programs..... well I am new to JDBC/Oracle. my Configuration:
Oracle 9i EE, Oracle JDBC Thin driver, Sun JDK 1.3.1 SE
Do you have any hints for me?
Thanks
Thomas
Received on Wed Apr 24 2002 - 14:51:58 CDT