Tag mysql last insert id on duplicate key update

MySQL LAST_INSERT_ID Function

Example Return the AUTO_INCREMENT id of the last row that has been inserted in a table: SELECT LAST_INSERT_ID(); Definition and Usage The LAST_INSERT_ID() function returns the AUTO_INCREMENT id of the last row that has been inserted in a table. Syntax…