我可以从批量插入中检索lastInsertId吗? [英] Can I retrieve the lastInsertId from a bulk insert?
本文介绍了我可以从批量插入中检索lastInsertId吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
INSERT INTO details (idactivity,user,hours,val,date) VALUES ('981','133','0','10500','2008-07-01'),('981','184','0','2750','2008-07-01'),('981','184','0','2750','2008-07-01')
(ids作为详细信息表PK)
(iddetails as details table PK)
有没有一种方法可以获取3个新的iddetails并将它们发送到下一个批量插入查询?
Is there a way to get the 3 new iddetails and get them to the next bulk insert query?
INSERT INTO activity (idactivity,iddetails) VALUES('981',??),('981',??),('981',??)
推荐答案
据我所知,不在mysql
中.
这篇关于我可以从批量插入中检索lastInsertId吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文