title: Get next ResultSet in JDBC
body: <p>I have 2 queries and therefore 2 <code>ResultSet</code>'s returned from MySQL in Java through <code>createStatement()</code>. The queries are like</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT * FROM abc;
  SELECT * FROM def;
  </code></pre>
  
  <p>These queries are run simultaneously in single <code>createStatement()</code> like</p>
  
  <pre><code>CreateConnection();
  Statement stat = conn.createStatement();
  ResultSet rs = stat.executeQuery("select * from ABC; select * from DEF;");
  while(rs.next()) {
      //Iterate through first resultset 
  }
  rs.close();
  stat.close();
  conn.close();
  </code></pre>
  
  <p>How can I get the next <code>ResultSet</code> returned by second query?</p>