嘿伙计们,我想知道每个查询一次可以使用超过 1 个 INSERT 吗?还是每次插入都必须一次完成?
例如,我想将这两个查询作为一个查询来执行以节省服务器资源:
INSERT INTO ExtraStats (date, supportStaff, startEmails, endEmails, emailsAnswered) VALUES ('2012-09-01', '5', '4', '3', '2') ON DUPLICATE KEY UPDATE supportStaff = '5', startEmails = '4', endEmails = '3', emailsAnswered = '2'
INSERT INTO ExtraStats (date, supportStaff, startEmails, endEmails, emailsAnswered) VALUES ('2012-09-2', '5', '6', '7', '8') ON DUPLICATE KEY UPDATE supportStaff = '5', startEmails = '6', endEmails = '7', emailsAnswered = '8'
有没有将它们结合起来?我试着把它们放在同一个查询中,但它不喜欢它。