mysql创建触发器出现错误提示
mysql>CREATETRIGGERtrig_updateAFTERINSERTONusers->FOREACHROWBEGIN->UPDATEclassSETuid=...
mysql> CREATE TRIGGER trig_update AFTER INSERT ON users
-> FOR EACH ROW BEGIN
-> UPDATE class SET uid = 0003 where classid = 3003;
ERROR 1064 (42000): 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 3
mysql版本是5.5的,users表和class表没有错误,在class表中存在classid = 3003;我检查重写和几遍了一直是这个错误.请各位老师指点一二,谢谢. 展开
-> FOR EACH ROW BEGIN
-> UPDATE class SET uid = 0003 where classid = 3003;
ERROR 1064 (42000): 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 3
mysql版本是5.5的,users表和class表没有错误,在class表中存在classid = 3003;我检查重写和几遍了一直是这个错误.请各位老师指点一二,谢谢. 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询