Mysql更新案例查询

时间:2016-01-22 10:29:28

标签: mysql

无法解决此查询的错误

我在第一次SET时遇到错误而且我不明白我错过了什么......

UPDATE 
supplier t1,
ps_product t2,
ps_product_shop t3,
SET t2.price=CASE
    WHEN t1.prezzo<=4.99 THEN 
    t1.prezzo*2
    END,
t2.wholesale_price=CASE
    WHEN t1.prezzo<=4.99 THEN t1.prezzo*2
    END,
t3.price=CASE
    WHEN t1.prezzo<=4.99 THEN t1.prezzo*2
    END,
t3.wholesale_price=CASE
    WHEN t1.prezzo<=4.99 THEN t1.prezzo*2
    END
WHERE 
t1.code=t2.reference
AND 
t2.id_product=t3.id_product
AND 
t2.id_product=t4.id_product

1 个答案:

答案 0 :(得分:-1)

正如RubahMalam所说,它是第一个SET之前的逗号