Monday, February 27, 2017

MYSQL How to pass list of values to Stored Procedure

MYSQL How to pass list of values to Stored Procedure


DELIMITER $$


DROP PROCEDURE IF EXISTS `updateAllOtherInsurance`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `updateAllOtherInsurance`(pIDs VARCHAR(1000))
BEGIN

DELETE FROM patientinsuranceelgihistory WHERE FIND_IN_SET(patientInsID, pIDs) > 0;

END$$

DELIMITER ;

Available link for download