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?
rs =
Try using an alias
rs = st.executeQuery("select last_insert_id() as last_id from schedule"); lastid = rs.getString("last_id");