Can somebody explain how works MySQL function LAST_INSERT_ID(). I\'m trying to get id of last inserted row in database, but every time get 1.
I use mybatis.
LAST_INSERT_ID()
is per user and per connection.
You can read more in MySQL doc.