Tag Archive

A comma seperated list as parameter to mysql stored procedure

Published on December 28, 2008 By admin

In MySQL there appears to not be support for passing a variable to a stored procedure and using that variable in an IN CLAUSE. Here’e the body of an extremely simple stored procedure that I will use to illustrate the problem. CREATE DEFINER=`root`@`localhost` PROCEDURE `spMySampleStoredProc`(idlist varchar(1000)) select * from tblSampleTable where theid in (idlist); END$$ [...]