Declaration Section [ESQL]

Declares host variables in an Embedded SQL program. Host variables are used to exchange data with the database.

Quick Links:

Go to Examples

Go to Usage

Go to Standards

Go to Permissions

Syntax

EXEC SQL BEGIN DECLARE SECTION;
... C declarations
EXEC SQL END DECLARE SECTION;

Examples

(back to top)

Usage

(back to top)

A declaration section is a section of C variable declarations surrounded by the BEGIN DECLARE SECTION and END DECLARE SECTION statements. A declaration section makes the SQL preprocessor aware of C variables that are used as host variables. Not all C declarations are valid inside a declaration section.

Standards

(back to top)

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

Permissions

(back to top)

None

Related reference
BEGIN … END Statement