title: Get last inserted auto increment id in mysql
body: <p>I am trying to get the mysql command like mysql_insert_id(); which retrieve the last inserted row's auto_increment id. What can I do to get it in Java?</p>
  
  <pre><code>rs = st.executeQuery("select last_insert_id() from schedule");
  lastid = rs.getString("last_insert_id()");
  </code></pre>
  
  <p>my lastid was declared as INT. I dono what to use in rs.get and also the parameter..</p>