我遇到此更新声明的问题:
update customers
set customers.email = initialsynctemptable.thinkEmail,
customers.packages = initialsynctemptable.thinkPackages
FROM customers INNER JOIN initialsynctemptable
ON customers.id = initialsynctemptable.customerID
正在使用mySQL。 FROM字下有一条曲线。本质上我试图用另一个表中的数据(initialsynctemptable)更新一个表(客户).....求助!谢谢你
答案 0 :(得分:2)
尝试
UPDATE customers c INNER JOIN
initialsynctemptable i ON c.id = i.customerID
SET c.email = i.thinkEmail,
c.packages = i.thinkPackages