BEGIN select info; END$$DELIMITER ; call print('hello world');显示没问题 drop trigger if exists trg_pay_insert; create trigger trg_pay_insert after insert on pay for each row begin call print('hello'); end;创建的时候报错:Error Code : 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 (0 ms taken)Error Code : 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 'end' at line 1 (0 ms taken)
create trigger A
after insert on B
for each row
begin
call Compare();
end;
我直接call Compare()能执行的
在SP中加入select 变量名
DELIMITER $$DROP PROCEDURE IF EXISTS `sq_youpin`.`print`$$CREATE PROCEDURE `print` (info varchar(1024))
BEGIN
select info;
END$$DELIMITER ;
call print('hello world');显示没问题
drop trigger if exists trg_pay_insert;
create trigger trg_pay_insert
after insert on pay
for each row
begin
call print('hello');
end;创建的时候报错:Error Code : 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
(0 ms taken)Error Code : 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 'end' at line 1
(0 ms taken)