Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Get Last MySQL AUTO_INCREMENT ID

DZone's Guide to

Get Last MySQL AUTO_INCREMENT ID

·
Free Resource
// Get last MySQL AUTO_INCREMENT ID
// http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html


SELECT LAST_INSERT_ID();
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}