我的触发器错误

zzzyeukh  于 2021-06-20  发布在  Mysql
关注(0)|答案(0)|浏览(255)

我的触发器仍然出错,这是我的sql代码
查询sql:

CREATE DEFINER = `user`@`localhost` 
TRIGGER `trg_group` 
BEFORE DELETE ON `ref_group` 
FOR EACH ROW IF old.id = 1 OR old.name ='super_admin' THEN 
    SIGNAL SQLSTATE '45000' 
    SET MESSAGE_TEXT = 'This record is sacred! You are not allowed to remove it!!'

mysql数据库


# 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 '' at line 3

怎么了?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题