MYSQL关于trigger中begin...end代码段中语法错误的一个坑

CREATE TRIGGER trigger_activity_id_delete
AFTER DELETE 
ON tp_activity FOR EACH ROW
BEGIN
    DELETE FROM tp_code WHERE OLD.id = tp_code.`activity_id`;
END 

报错:

1 queries executed, 0 success, 1 errors, 0 warnings

查询: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 'End' at line 1

执行耗时   : 0 sec
传送时间   : 0 sec
总耗时      : 0 sec

原因:

以后再说吧,好人一生平安,cuo

发布了6 篇原创文章 · 获赞 1 · 访问量 3035
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览