我尝试创建以下触发器:
DELIMITER $$
CREATE trigger insert_processor
BEFORE INSERT ON tbl
FOR EACH ROW BEGIN
set new.val = trim(new.val);
set new.val2 = upper(new.val);
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 '' at line 8
可能是什么原因?
MySql服务器版本:5.1.40-community
客户:phpMyAdmin 3.3.8