Forum : How to find out which auto increment was assigned on the last insert?
Brief description  about Online courses   join in Online courses
View Abhijit  Paul 's Profile

How to find out which auto increment was assigned on the last insert?

Hi sir,

find previous auto increment....
Asked by Abhijit Paul | Nov 23, 2009 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Abhijit,

It can be done as follows:

SELECT LAST_INSERT_ID() will return the last value assigned by the auto_increment function. Note that you do not have to specify the table name

Hope you got your query cleared.
Nov 23, 2009