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.
I have two solutions, after implements much complicated i find out about second one...
I will tell you second which is better one ...
It's pretty simple... just in query insert this keyProperty="id"
Like this :
Query returns id of inserted row
Thanks!