Skip to content

Instantly share code, notes, and snippets.

@dusanstanojeviccs
Created November 5, 2017 22:06
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 dusanstanojeviccs/d426fa102ea773c0370672a64caa0d07 to your computer and use it in GitHub Desktop.
Save dusanstanojeviccs/d426fa102ea773c0370672a64caa0d07 to your computer and use it in GitHub Desktop.
public void delete(int id) throws SQLException {
PreparedStatement preparedStatement = database.getConnection().prepareStatement("delete from books where id = ?");
preparedStatement.setInt(1, id);
preparedStatement.execute();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment