Reputation: 2153
I want to get the autoincrement id of an insert.
is there a way to do it?
Upvotes: 1
Views: 1319
Reputation: 449823
Seeing as you're specifying only mySQL in your tags:
Use LAST_INSERT_ID()
. Make sure to read the manual page for the subtleties.
The language you are querying mySQL from may have built-in API functions that do the same thing.
Upvotes: 7