MySQL Forums
Forum List  »  Docs

Re: MySQL Tutorial: LAST_INSERT_ID()
Posted by: Mike Hillyer
Date: October 18, 2004 08:50AM

From http://dev.mysql.com/doc/mysql/en/Information_functions.html

LAST_INSERT_ID(expr)
Returns the last automatically generated value that was inserted into an AUTO_INCREMENT column.

This is the expected behaviour and I see nothing in the docs that would lead a user to believe that the LAST_INSERT_ID() is related to a specific table. In any case, how would one designate which table the LAST_INSERT_ID() is to refer to? As far as I can tell it is not a bug in either case.

Mike Hillyer, Technical Writer
MySQL AB, www.mysql.com
Office: +1 403-380-6535

Blog: http://www.openwin.org/mike

"The Open Source movement has become a major force across the software industry, and MySQL is the world's most popular open source database."
--Fortune Magazine

Options: ReplyQuote


Subject
Views
Written By
Posted
65867
September 14, 2004 07:43AM
Re: MySQL Tutorial: LAST_INSERT_ID()
23698
October 18, 2004 08:50AM
17910
December 16, 2004 12:15AM
14224
March 08, 2007 10:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.