• 触发器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

求解哪里出现了问题

  • TIMI    2019-06-04 13:29:40
  • 阅读 1839    收藏 0    回答 1
  • 邀请
  • 收藏
  • 分享
发送
登录 后发表评论
  • 51testing软件测试圈微信