You can do a "trick" with
group_concat[
^], dynamic sql, inserting into a temporary table.
drop temporary table if exists temp;
create temporary table temp( val char(255) );
set @sql = concat("insert into temp (val) values ('", replace(( select group_concat(@item_ids) as data), ",", "'),('"),"');");
prepare stmt1 from @sql;
execute stmt1;
(Adapted from example at
MySQL :: Re: Convert comma separated string to rows[
^] )
You would then do
select * from tbl_employee where employeeid in (select val from temp)
or if you were sure there are no duplicates in the @item_ids list
select * from tbl_employee inner join temp on val = employeeid