MySQL Tutorial/Procedure Function/Declare
The DECLARE Statement
The DECLARE statement is used to create local variables, conditions, handlers, and cursors within the procedure.
DECLARE must be the first statements immediately within a BEGIN block.
A common declaration is the local variable, which is done with a variable name and type:
DECLARE <name> <data type> [DEFAULT];