Skip to content
Snippets Groups Projects
Commit 6a904fce authored by koz01's avatar koz01
Browse files

Batch delete

parent 36ed3b30
Branches 2022_Wed_7-15
No related merge requests found
......@@ -101,8 +101,9 @@ public class ScoreDAO {
PreparedStatement pstms = conn.prepareStatement("DELETE FROM score WHERE id = ?")){
for (Integer id: idsForDelete) {
pstms.setInt(1, id);
pstms.executeUpdate();
pstms.addBatch();
}
pstms.executeBatch();
} catch (SQLException e) {
e.printStackTrace();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment