title: Difference between resultset in java and cursor in mysql
body: <p>When using java+mysql I came up with two methods to traverse through the datasets</p>
  
  <ol>
  <li><p>Using cursor and stored procedure in sql and then execute it in java to find whether the user exist or not.</p></li>
  <li><p>Using "resultSet" in java to find the user exist or not.</p></li>
  </ol>
  
  <p>Can anyone tell me which is efficient to use and why?</p>