I tried finding an answer to this online, but could not find any clear explanation:
Does the @ in a stored procedure serve some sort of special purpose/signify something in particular? I am a little confused as to when we use it, since examples seem to vary on its usage.
For instance in the following example @ is used:
DELIMITER $
DROP PROCEDURE IF EXISTS emp_count_2;
CREATE PROCEDURE emp_count_2(OUT param1 INT)
BEGIN
SELECT COUNT(*) INTO param1 FROM Employee;
END
$
DELIMITER ;
/* To invoke this procedure use the mysql command statement
CALL emp_count_2(@empCount);
SELECT @empCount;
*/
Once again, does the @ in this example serve some sort of special purpose, or can we remove the @ and just use normal variable names?
**EDIT: I am using MySql