![](/img/trans.png)
[英]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.