Select one row element
You can select an entire row element from a collection into a row type host variable.
The INTO clause identifies a row variable in which to store the row element that is selected from the collection variable.
The following
code fragment selects one row from the set_col column into
the row type host variable a_row:
EXEC SQL BEGIN DECLARE SECTION;
client collection set(row(a integer) not null) a_set;
row (a integer) a_row;
EXEC SQL END DECLARE SECTION;
EXEC SQL select set_col into :a_set from tab1
where id_col = 17;
EXEC SQL select * into :a_row from table(:a_set);