Why is my query output different between SP and query execution. I am executing a simple select query to assign some value..
SP:
CREATE DEFINER=`root`@`localhost` PROCEDURE `INS_EXPENSES`(
IN CATNAME varchar(100),
IN SUBCATNAME varchar(100),
IN AMOUNT INT,
IN USERID INT,
IN DESCRIPTIONS varchar(100)
)
BEGIN
SELECT SUBCATNAME;
SELECT * FROM SUBCAT WHERE SUBCATNAME='MISC';
END
THE ABOVE SELECT QUERY RETURNS ALL DATA FROM THE SUBCAT TABLE. WHERE IN SAME QUERY WORKS FINE IF EXECUTED OTHERWISE.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…