NexusDB Manual V3 > SQL Reference > SQL Statements > Control Statements
Declare one or more SQL variables.
Syntax
<SQL variable declaration> ::=
<SQL variable name list> ::= variable-name [ { , variable-name }... ]
Usage
The DECLARE statement is used to declare SQL variables. SQL variables that are declared in the context of triggers, procedures and functions are local to the statement block where they are declared. SQL variables that are declared in the context of the main executing statement block are global session variables.
Notes
Examples
DECLARE min, max INTEGER;
DECLARE count INTEGER DEFAULT 0; DECLARE total DOUBLE PRECISION DEFAULT 0;
Conformance
|
© Nexus Database Systems Pty Ltd.