I want to get last inserted row id in mysql any one help me Table field is
See Question&Answers more detail:osI want to get last inserted row id in mysql any one help me Table field is
See Question&Answers more detail:osIf you want to get the id just after the insertion, use LAST_INSERT_ID()
:
SELECT LAST_INSERT_ID();
This will return the AUTO_INCREMENT
value of the last inserted element (in your current connection).
If you want to know which is the last inserted value in a determined table, use any of the queries provided in the other answers.