Inserting into a Row Variable (ESQL/C, SPL)

The INSERT statement does not support a row variable in the Collection- Derived-Table segment. You can use the UPDATE statement, however, to insert new field values into a row variable. For example, the following code fragment inserts a new row into the rectangles table (which Inserting Values into ROW-Type Columns defines):
EXEC SQL BEGIN DECLARE SECTION;
   row (x int, y int, length float, width float) myrect;
EXEC SQL END DECLARE SECTION;

...
EXEC SQL update table(:myrect) 
   set x=7, y=3, length=6, width=2;
EXEC SQL insert into rectangles values (12, :myrect);

For more information, see Updating a Row Variable (ESQL/C).