Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
DECLARE Statement (SQL) (m691509+declare.htm)
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)