I am trying to use this command to update saving.balance
using IF statement:
UPDATE TABLE saving s, time t
SET s.balance = IF(t.currency_TYPE = ‘RMB’, s.balance + t.balance * t.interest)
WHERE t.ID = 'input'
AND s.User = t.User;
However, MySQL gives me ERROR 1064
, what's wrong and how to correct it?