一个小小的小技巧

SELECT @@identity;和SELECT LAST_INSERT_ID();

查询上一条插入记录的id

原文地址:https://www.cnblogs.com/liuyangfirst/p/7455133.html