-1
可能重复:
How to fix this MySQL trigger?如何解决这个IF-ELSE-THEN语句在MySQL触发
CREATE TRIGGER Transaction_insert BEFORE INSERT ON Transaction
FOR EACH ROW
IF Account.CreditBalance + NEW.Amount < Account.CreditLimit WHERE Number = NEW.AccountNumber THEN
UPDATE Account SET CreditBalance = CreditBalance + NEW.Amount where Number = NEW.AccountNumber;
ELSE
SET NEW.Valid = 0
END IF;
我从phpMyAdmin的此错误消息。