title: PreparedStatement executing successfully in oracle but throwing exception in Microsoft SQL
body: <p>I have this below query that I execute using java PreparedStatement:</p>
  
  <pre><code>String dml=insert into users(name, addr, city, sex, dob) values(?,?,?,?,?);
  PreparedStatement stmt = conn.prepareStatement(dml);
  stmt.setString(1,"abcd");
  stmt.setString(2,"def");
  stmt.setString(3,"ghij");
  stmt.setString(4,"m");
  stmt.setString(5,"1-Jan-1987");
  stmt.executeQuery();
  </code></pre>
  
  <p>It executes successfully when the database is Oracle, but when the database is Microsoft SQL, then it throws an exception <code>"java.sql.SQLException: The executeQuery method must return a result set"</code>. Could someone please tell what is the issue here. Why is the same query executing successfully in oracle but not in microsft sql?</p>