简体   繁体   中英

update table from other error in mysql XAMPP

I'm trying to update table from other but I got error this is my query

UPDATE items
SET items.Price = prix.Price from items,prix WHERE items.ID = prix.ID

There is no update ... from Syntax. You have to use update ... join :

UPDATE items join prix on items.ID = prix.ID
SET items.Price = prix.Price 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM