ghy19980814
ghy19980814
2019-06-02 21:37

触发器SQL语句报错求解决

5
  • sql

CREATE TRIGGER Insert_TV_PRICE
BEFORE INSERT ON SALE FOR EACH ROW

BEGIN

IF (new.GNAME = '电视机') AND (new.PRICE < 2000) THEN
new.PRICE : = 2000;
END IF;
END;

报错信息为
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 '.PRICE : = 2000;
END IF;
END' at line 5

求解哪里出现了问题

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答