Parameters for table, field and searchValue
Hi Folks,
Im trying to create a sproc that will return 1 or 0 if a searchValue is found within a specified field within a specified table.
Something like...
CREATE DEFINER=`root`@`localhost` PROCEDURE `usp_CheckIfValueExists`(IN p_tbl varchar(50), IN p_fld varchar(50), IN p_searchValue varchar(50))
BEGIN
SELECT EXISTS(SELECT 1 FROM p_tbl WHERE p_fld = p_searchValue);
END
But it just not working.
Can I not use parameters on the left side of a Where clause ??
J
Subject
Views
Written By
Posted
Parameters for table, field and searchValue
2521
October 13, 2015 04:53PM
923
October 13, 2015 11:57PM
1039
October 14, 2015 02:45PM
1091
October 14, 2015 04:09PM
851
October 24, 2015 10:50PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.