
Create a stored procedure
CREATE DEFINER=` root ` @ % ` ` FUNCTION ` gettest ` (area_name varchar (255)) RETURNS a varchar (5000) CHARSET utf8
The BEGIN
DECLARE sTemp VARCHAR (5000);
DECLARE sTempChd VARCHAR (5000) the default '1'.
DECLARE sNo VARCHAR (5000) the default null;
DECLARE no int the default 0;
The set sTemp=(SELECT group_concat (parent) FROM erp_privilege
Where priv_id (cast in area_name as char ()));
Insert into test (test_name) values (sTemp);
RETURN sTemp.
END
Function in the select statement is used in the way so I would like to pass multiple values in the specific look at the picture 2
I pass the 25, 30 two picture

But only the first value involved in the operation (30) and a (25) or after a few values don't add a
To solve the
CodePudding user response:
For FIND_IN_SET