请高手帮忙看下这个触发器 哪里写错了
数据库编码utf-8,数据库引擎myisam
sql:
create trigger trg1After insert on idiFor each rowBeginupdate uk set kucun = kucun-new.num where iid = new.id;End
错误SQL 查询: CREATE trigger trg1 AFTER INSERT ON idiFOR eachROW BEGIN UPDATE uk SET kucun = kucun - new.num WHERE iid = new.id;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 5