[CODE=mysql]SET @qry = 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
PREPARE stmt2 FROM @s;
SET @first_param = 6;
SET @sec_param = 8;
EXECUTE stmt2 USING @first_param, @sec_param;
[/CODE]
These are few lines in my stored procedure. Here if I change the identifiers @qry, @first_param, @sec_param to qry, first_param, sec_param respectively
mysql doesn't allow to compile the stored procedure.
Why only global variables are allowed here?
PREPARE stmt2 FROM @s;
SET @first_param = 6;
SET @sec_param = 8;
EXECUTE stmt2 USING @first_param, @sec_param;
[/CODE]
These are few lines in my stored procedure. Here if I change the identifiers @qry, @first_param, @sec_param to qry, first_param, sec_param respectively
mysql doesn't allow to compile the stored procedure.
Why only global variables are allowed here?