Ad Code

MySQL: update a field only if condition is met

Here you have another example:

UPDATE
    prices
SET
    final_price= CASE
    WHEN currency=1 THEN 0.81*final_price
    ELSE final_price
END


 

Post a Comment

0 Comments