MySQL LAST_INSERT_ID() used with multiple records INSERT statement

后端 未结 3 1219
借酒劲吻你
借酒劲吻你 2020-11-27 05:39

If I insert multiple records with a loop that executes a single record insert, the last insert id returned is, as expected, the last one. But if I do a multiple records inse

3条回答
  •  萌比男神i
    2020-11-27 06:00

    This behavior is mentioned on the man page for MySQL. It's in the comments but is not challenged, so I'm guessing it's the expected behavior.

提交回复
热议问题