Valid in: ESQL
The Begin Declare statement begins a program section that declares host language variables to embedded SQL. (All variables used in embedded SQL statements must be declared.) A single program can have multiple declaration sections.
The statements that can appear inside a declaration section are:
The End Declare section statement marks the end of the declaration section.
The Begin Declare statement has the following format:
EXEC SQL BEGIN DECLARE SECTION
All users are permitted to use this statement.
The following examples shows the typical structure of a declaration statement:
exec sql begin declare section;
buffer character_string(2000);
number integer;
precision float;
exec sql end declare section;