This is my code to search database entries with pattern as a value in parameter PLACE1,
DROP PROCEDURE `casetwosplit`;
CREATE DEFINER=`root`@`localhost` PROCEDURE `case` (IN `PLACE1` LONGTEXT)
NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER
select all PLACE,CITY,LATTITUDE,LONGITUDE
from LOCATION
where PLACE like @'%PLACE1%
On execution, I am getiing no result eventhough the values are present. When the value in the variable PLACE1 is provided explicitly, I am getting the result. But when the pattern in the like clause has the variable name it's not interpolating the variable value in the query.