Syntax of the collection data type

Use the collection data type to declare host variables for columns of collection data types (SET, MULTISET, or LIST).

As the following syntax diagram illustrates, you must use the collection keyword as the data type for a collection host variable.

1 (1)  client  collection? 
2.1 set
2.1 multiset
2.1 list
1 (
1 element type
1 not null
1 ) + , variable name  ;
Notes:
  • 1 Informix® extension
Element Purpose Restrictions SQL Syntax
element type Data type of the elements in the collection variable Can be any data type except SERIAL, SERIAL8, BIGSERIAL, TEXT, or BYTE Data Type segment in the Informix Guide to SQL: Syntax
variable name Name of the Informix ESQL/C variable to declare as a collection variable Name must conform to language-specific rules for variable names.

A collection variable can be any SQL collection type: LIST, MULTISET, or SET.

Important: You must specify the client keyword when you declare collection variables.