In my code I am using
String query= "delete all from myTable";
stmt.executeQuery(query);
Ideally for DML executeUpdate should be used instead. However, executeQuery too works well. So, was curious to know what could be the harm of using executeQuery instead of executeUpdate?