in `_str`varchar(8000),out `outstr`varchar(8000)
BEGIN
if instr(_str,',')>0 THEN
select CONCAT("'",REPLACE(_str,',',"','"),"'") into outstr;
else
select _str into outstr;
END IF;
END
in `_str`varchar(8000),out `outstr`varchar(8000)
BEGIN
if instr(_str,',')>0 THEN
select CONCAT("'",REPLACE(_str,',',"','"),"'") into outstr;
else
select _str into outstr;
END IF;
END
转载于:https://www.cnblogs.com/w-pengchao/p/10774368.html