I have using mysql with stored procedure. Inside of strored procedure i have write the select query with IN() function. I have pass the 5 value inside of the function but it display the first value data's only.my code is
DELIMITER $$ CREATE DEFINER=
root@localhostPROCEDUREpro1(INreg_idVARCHAR(50))BEGIN
SELECT COUNT(master_country_id) AS num FROM master_country WHERE master_region_id IN(reg_id) ORDER BY master_country_id DESC;
END$$
DELIMITER ;
the countries are,
1 - India
2 - Australia
3 - Canada
4 - Spain
5 - Srilanka
I have call the procedure is
CALL pro1(1,4,2);
The actual Result is,
India,Spain,Australia
But It display the result is,
India