JDBC Batch INSERT, RETURNING IDs
问题 is there any way to get the values of affected rows using RETURNING INTO ? I have to insert the same rows x times and get the ids of inserted rows. The query looks like below: public static final String QUERY_FOR_SAVE = "DECLARE " + " resultId NUMBER ; " + "BEGIN " + " INSERT INTO x " + " (a, b, c, d, e, f, g, h, i, j, k, l, m) " + " values (sequence.nextVal, :a, :b, :c, :d, :e, :f, :g, :h, :i, :j, :k, :l) " + " RETURNING a INTO :resultId;" + "END;"; Now i can add thise query to batch, in