Select from a row-type column
The SELECT statement allows you to access a row-type column
in the following ways:
- Selecting all fields in the row-type column
- Selecting particular fields in the row-type column
Select the entire row-type column
To select all fields in a row-type column, specify the row-type column in the select list of the SELECT statement. To access these fields from the Informix® ESQL/C application, specify a row host variable in the INTO clause of the SELECT statement. For more information, see Initialize a row variable.
Select fields of a row column
You
can access an individual field in a row-type column with dot
notation. Dot notation allows you to qualify an SQL identifier
with another SQL identifier. You separate the identifiers with the
period (.) symbol. The following SELECT statement performs the same
task as the two SELECT statements in Selecting from a row variable:
EXEC SQL select rect.width into :rect_width from rectangles;
For more information about dot notation, see the Column Expression section of the Expression segment in the Informix® Guide to SQL: Syntax.