This statement is used to declare local variables within stored
programs. To provide a default value for the variable, include a
DEFAULT clause. The value can be specified as
an expression; it need not be a constant. If the
DEFAULT clause is missing, the initial value
Local variables are treated like stored routine parameters with
respect to data type and overflow checking. See
Section 12.1.12, “
CREATE PROCEDURE and
CREATE FUNCTION Syntax”.
Local variable names are not case sensitive.
The scope of a local variable is within the
END block where it is declared. The variable can be
referred to in blocks nested within the declaring block, except
those blocks that declare a variable with the same name.