Take the 2-minute tour ×

If I have a batch of rows to insert where each row gets a sequence generated id, how can I get those ids (or at least the last one) back when using JdbcTemplate?

E.g., for a single row, I know I use, among other ways

jdbcTemplate.update(PreparedStatementCreator, KeyHolder);

But there seems to be no correlating batchUpdate method with a KeyHolder parameter.

share|improve this question
Check this: stackoverflow.com/questions/2423815/… –  user2389335 Jun 14 '13 at 6:24
Thanks.. essentially, you can't. fiddle. –  ticktock Jun 14 '13 at 20:01
add comment

Your Answer



Browse other questions tagged or ask your own question.