我是靠谱客的博主 风趣小伙,这篇文章主要介绍mysql创建触发器1064,MySQL创建触发器1064错误,现在分享给大家,希望可以做个参考。

The sql i wrote

**delimiter |

CREATE

DEFINER=CURRENT_USER

TRIGGER set_profiletype_after_insert BEFORE INSERT ON trl_translator FOR EACH ROW

BEGIN

UPDATE trl_profile SET trl_profile.type = 'translator' WHERE trl_profile.profile_id = NEW.translator_id

END

|

delimiter ;**

The error given

[SQL]

**CREATE

DEFINER=CURRENT_USER

TRIGGER set_profiletype_after_insert BEFORE INSERT ON trl_translator FOR EACH ROW

BEGIN

UPDATE trl_profile SET trl_profile.type = 'translator' WHERE trl_profile.profile_id = NEW.translator_id

END

;

[Err] 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 'END' at line 6**

How to solve this ? where is the mistake i do ?

解决方案

It looks like you simply need to terminate your UPDATE statement with a semicolon.

最后

以上就是风趣小伙最近收集整理的关于mysql创建触发器1064,MySQL创建触发器1064错误的全部内容,更多相关mysql创建触发器1064内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(54)

评论列表共有 0 条评论

立即
投稿
返回
顶部