[MySQL] MySQL Insert Id
Contents
The value to be used by the following INSERT or ALTER TABLE statement when inserting an AUTO_INCREMENT value. This is mainly used with the binary log.
insert_id 是mysql session变量,设置该变量会影响下一条INSERT 或 ALTER TABLE 操作的 AUTO_INCREMENT 值。
比如:
|
|
此时插入的数据id将为0,而非1;