There is an a problem on declaring variables on MYSQL stored procedure.The code I used I used is shown below.
DELIMITER $$
CREATE
/*[DEFINER = { user | CURRENT_USER }]*/
PROCEDURE `emp`.`third_SP`()
/*LANGUAGE SQL
| [NOT] DETERMINISTIC
| { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT 'string'*/
BEGIN
DECLARE p1 int ;
SELECT Min(esal)
INTO pl
FROM employ;
END$$
DELIMITER ;
It shows the error message as
----------------------------------
error code :1327
undeclared variable p1
----------------------------------
I am using MySQL 5.1.4.1..Using SQLYOG Enterprise Trial 7. 11 as GUI.Anyone plz help me.
Thanks