
how can we do batch updates using callablestatement interface

The batch update is the ability to process more than one statement at once.CallableStatement.executeBatch() method is used to execute the batch of statements.
CallableStatement cstmt = con.prepareCall("{call updatePrices(?, ?)}");
cstmt.setString(1, "A");
cstmt.setFloat(2, 8.49f);
cstmt.addBatch();
cstmt.setString(1, "B");
cstmt.setFloat(2, 9.49f);
cstmt.addBatch();
int [] updateCounts = cstmt.executeBatch();
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
