The Declare Table Statement
The DECLARE TABLE statement can be used to describe the structure of a table in ESQL programs. With this statement, you can document the columns and data types associated with a table.
For example, the employee table can be described with a DECLARE TABLE statement as follows:
exec sql declare userjoe.employee table
(
emp_number integer2 not null not default,
last_name varchar(20) not null,
first_name varchar(20),
birth_date date not null not default
);
For complete details, see the entry for the DECLARE TABLE statement in the SQL Reference Guide. For information on ESQL programs, see the chapter “Embedded SQL” in the SQL Reference Guide.