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.
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 HCL OneDB Guide to SQL: Syntax |
variable name | Name of the 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.