Spring JDBC Example/Question: How do I perform a SQL DELETE query (statement) using JDBC and the Spring Framework?
Here's a simple Java method that I created to perform a SQL DELETE using Spring JDBC techniques:
private void deleteById(String sql, int id)
To use this method you just need to call it with the SQL DELETE statement you want to run, also passing in the
id of the record you want to delete, like this: