Firebird Documentation Index → Firebird 1.5 Language Ref. Update → PSQL statements → DECLARE [VARIABLE] with initialization |
Available in: PSQL
Changed in: 1.5
Description: In Firebird 1.5 and above, a PSQL local variable can be initialized upon declaration. The VARIABLE keyword has become optional.
Syntax:
DECLARE [VARIABLE]varname
datatype
[{= | DEFAULT}value
];
Example:
create procedure proccie (a int) returns (b int) as declare p int; declare q int = 8; declare r int default 9; declare variable s int; declare variable t int = 10; declare variable u int default 11; begin<intelligent code here>
end
Firebird Documentation Index → Firebird 1.5 Language Ref. Update → PSQL statements → DECLARE [VARIABLE] with initialization |