MySQL触发器连接字符串
问题是当我试图设置CAD变量时 下面是我的示例代码:MySQL触发器连接字符串,mysql,string,triggers,concatenation,Mysql,String,Triggers,Concatenation,问题是当我试图设置CAD变量时 下面是我的示例代码: BEGIN DECLARE vUser varchar(50); set @cad: = "The user "+ vUser+ " add the jurisdiction "+ NEW.name; INSERT INTO ActivyLog VALUES (null,'Jurisdiction added', @cad, now(), now(), '1' , '1' ); END 试试这个它确实有效,这是正
BEGIN
DECLARE vUser varchar(50);
set @cad: = "The user "+ vUser+ " add the jurisdiction "+ NEW.name;
INSERT INTO ActivyLog
VALUES
(null,'Jurisdiction added', @cad, now(), now(), '1' , '1' );
END
试试这个它确实有效,这是正确的答案。康考特把弦聚在一起。
CONCAT("The user ", vUser, " add the jurisdiction ", NEW.name)