为啥一直提示这错误mysql

————————————前面已建触发器——————————————

mysql> create trigger upd_check before update on tb

    -> for each row

    -> begin

    -> if new.a < 0 then

    -> set new.a =0;

    -> elseif new.a > 100 then

    -> set new.a = 100;

    -> 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 '-> for each row

    -> begin

    -> if new.a < 0 then

    -> set new.a =0;

 ' at line 2


qq_小杜_1
浏览 1952回答 1
1回答

是王小二呀

分隔符
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

大数据