标签归档:LAST_INSERT_ID()

Mysql在插入一条记录后返回这条记录的ID值的方法。

Mysql提供了一个LAST_INSERT_ID()的函数。 LAST_INSERT_ID() (with no argument) returns the first automatically generated value that was set for an AUTO_INCREMENT column by the most recently executed INSERT or UPDATE statement to affect such a column. For example, after inserting a row that generates … 继续阅读

发表在 mysql/sql | 标签为 , | 留下评论