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

Home -> Community -> Usenet -> c.d.o.misc -> returning values from INSERT

returning values from INSERT

From: Thomas Ruschival <t.ruschival_at_vivid-md.de>
Date: Wed, 24 Apr 2002 21:51:58 +0200
Message-ID: <20020424215158.40533206.t.ruschival@vivid-md.de>


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

Original text of this message

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