Declares one or more local variables for use in a procedure.
DECLARE varname {AS} datatype {,varname {AS} datatype{...}}
variable
The name of the variable. This
must obey the same
rules as Table and Column names, except that it must start with an @
character.
datatype
Any supported SQL data type.
Local variables must be declared before they can be used.
Local variables are visible only within the procedure in which they are declared.
DECLARE @I AS INTEGER DECLARE @V1 DECIMAL(6,2), @UKN VARCHAR(5)