Hello.
As said at: http://dev.mysql.com/doc/mysql/en/Information_functions.html "If you insert many rows at the same time with an insert statement, LAST_INSERT_ID() returns the value for the first inserted row." LOAD DATA INFILE inserts several rows a time, so this is a usual behavior of LAST_INSERT_ID(). "Martin d'Anjou" <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to find in the manual what select last_insert_id() will return > after a load data infile command is executed. > > From my experiments, it returns the id of the FIRST record in the file, I > would have expected the LAST, but that is not the case. > > Is that documented somewhere? Can I rely on this behavior to be > consistent? > > Thanks, > Martin > > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]