Cannot create trigger - bad syntax
我想在事务表中每次插入后创建更新 total_money 的触发器。由于错误,我无法创建它:
#
1064 - Something is wrong in your syntax near '' in line 3
这是我的触发器创建代码:
1 2 3 4 |
如果添加分隔符,它将起作用,如下所示
分隔符 //
CREATE TRIGGER transactions_insert AFTER INSERT ON 事务
每一行开始
更新用户 SET users.total_money = users.total_money NEW.Price WHERE users.User_ID = NEW.User_id;
结尾;
//