Alec,
Friday, August 09, 2002, 2:01:10 PM, you wrote:

AC> If I insert a number, say X, of records using a single statement of the
AC> form
AC>       INSERT INTO table VALUES (...), (...), ..., (...)
AC> then retrieve the LAST_INSERT_ID, say Y, is it reasonable to assume that
AC> the records will be numbered contiguously from Y-X+1 to Y, even in a
AC> multi-user environment?
AC> And if not so, would it be reasonable if I LOCK the
AC> table round the insert?

LAST_INSERT_ID returns values for the first inserted row, if you
insert many rows with one INSERT statement. LAST_INSERT_ID returns
last id that was generated on this connection. If you insert another
value than NULL or 0 to the auto_increment column, it doesn't change
LAST_INSERT_ID Please, check the manual. You can find description of
this function here:
        http://www.mysql.com/doc/en/Miscellaneous_functions.html





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to