[英]Retrieve data from one table and insert/update in another table in mysql
[英]mysql update one table with data from another
我收到此更新声明的问题:
update customers
set customers.email = initialsynctemptable.thinkEmail,
customers.packages = initialsynctemptable.thinkPackages
FROM customers INNER JOIN initialsynctemptable
ON customers.id = initialsynctemptable.customerID
并正在使用mySQL。 在FROM字词下有一条弯曲的线。 本质上,我试图用另一个表(initialsynctemptable)中的数据来更新一个表(客户)。 感谢您
尝试
UPDATE customers c INNER JOIN
initialsynctemptable i ON c.id = i.customerID
SET c.email = i.thinkEmail,
c.packages = i.thinkPackages
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.