select into arrays

Use the select into array method when you know the maximum number of rows that will be returned. If a select into statement attempts to return more rows than the array can hold, the statement returns the maximum number of rows that the smallest array can hold.

Example

Following is an example of selecting into an array:

exec sql begin declare section;
     CS_CHAR titleid_array [100] [6];
 exec sql end declare section;
 ...
 exec sql select title_id into :titleid_array
     from titles;