Skip to content

Instantly share code, notes, and snippets.

@chrisblakely01
Created March 26, 2018 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisblakely01/504cb234e49a57d6c97932efffcd93b2 to your computer and use it in GitHub Desktop.
Save chrisblakely01/504cb234e49a57d6c97932efffcd93b2 to your computer and use it in GitHub Desktop.
Batch delete using JDBC template in Java
String sqlQuery = "delete from canned_message where msg_no in (:msgNos)";
List<Integer> params = <array list of number>;
Map namedParameters = Collections.singletonMap("msgNos", params);
int rows = smsdbJdbcTemplate.update(sqlQuery, namedParameters);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment