我想创建一个触发器,根据IrrMinCurr设置f_IrrMinCurr的值。这就是我写的。
CREATE TRIGGER Fuzzification BEFORE INSERT ON fuzzyanalysis
FOR EACH ROW
BEGIN
IF NEW.IrrMinCurr < 200.0 THEN
SET NEW.f_IrrMinCurr = 'H';
ELSE
SET NEW.f_IrrMinCurr = null;
END IF;
END;
我收到错误, 错误
SQL query:
CREATE TRIGGER Fuzzification BEFORE INSERT ON fuzzyanalysis
FOR EACH ROW
BEGIN
IF NEW.IrrMinCurr < 200.0 THEN
SET NEW.f_IrrMinCurr = null;
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5
任何人都可以帮我解决这个问题。