PDF (A4) - 40.3Mb
Man Pages (TGZ) - 262.0Kb
Man Pages (Zip) - 367.6Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
DECLAREvar_name [,var_name] ...type [DEFAULTvalue] This statement declares local variables within stored programs. To provide a default value for a variable, include aDEFAULT clause. The value can be specified as an expression; it need not be a constant. If theDEFAULT clause is missing, the initial value isNULL.
Local variables are treated like stored routine parameters with respect to data type and overflow checking. SeeSection 15.1.17, “CREATE PROCEDURE and CREATE FUNCTION Statements”.
Variable declarations must appear before cursor or handler declarations.
Local variable names are not case-sensitive. Permissible characters and quoting rules are the same as for other identifiers, as described inSection 11.2, “Schema Object Names”.
The scope of a local variable is theBEGIN ... END block within which 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.
For examples of variable declarations, seeSection 15.6.4.2, “Local Variable Scope and Resolution”.
PDF (A4) - 40.3Mb
Man Pages (TGZ) - 262.0Kb
Man Pages (Zip) - 367.6Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb