MULTISET(e) data type
The MULTISET data type is a collection type that stores a non-ordered set that can include duplicate element values.
The elements in a MULTISET have no ordinal position. That is, there is no concept of a first, second, or third element in a MULTISET. (For a collection type with ordinal positions for elements, see LIST(e) data type.)
MULTISET(element_type NOT NULL)
- Any built-in type, except SERIAL, SERIAL8, BIGSERIAL, BYTE, and TEXT
- An unnamed or a named ROW type
- Another collection type or opaque type
- After the IN predicate in the WHERE clause of a SELECT statement to search for matching MULTISET values
- As an argument to the CARDINALITY or mi_collection_card( ) function to determine the number of elements in a MULTISET column
You cannot use MULTISET values as arguments to an aggregate function such as AVG, MAX, MIN, or SUM.
You must specify the NOT NULL constraint for MULTISET elements. No other constraints are valid for MULTISET columns. For more information about the MULTISET collection type, see the HCL OneDB™ Guide to SQL: Syntax.
MULTISET {"blue", "green", "yellow"}
MULTISET {"blue", "green", "yellow", "blue"}
MULTISET {"blue", "green", "blue", "yellow"}
MULTISET {"blue", "green", "yellow", "blue"}
No more than 97 columns of the same table can be declared as MULTISET data types. (The same restriction applies to SET and LIST collection types.)