posted 19 years ago
Hi There,
I want to insert into mutliple tables using batch update like this,
Statement stmt= dbCon.createStatement();
stmt.addBatch("SELECT ID_SEQ.nextval as AID from dual");
stmt.addBatch("INSERT INTO AID_N VALUES (<AID>, "1");
stmt.addBatch("INSERT INTO AID_B VALUES (<AID>, "43");
stmt.addBatch("INSERT INTO AID_C VALUES (<AID>, "2");
How can I use the value AID selected in the first query, in the subsequent queries [inplace of <AID>].
Thanks
Mohamed Zafer