Literal Collection
Use the Literal Collection segment to specify values for a collection data type. For the syntax of expressions that return values of individual elements within a collection, see Collection Constructors.
Syntax
Literal Collection |----+-SET------+--{-| Literal Data |-}-------------------------| +-MULTISET-+ '-LIST-----' Literal Data .-,------------------------------------------------------------------------------------------. V (1) | |----+-| Element Literal Value |--------------------------------------------------------------+-+--| | (2) (2) | '-| Nested Quotation Marks |------| Literal Collection |--| Nested Quotation Marks |-----'
Usage
You can specify literal collection values for SET, MULTISET, or LIST data types.
INSERT INTO table1 (set_col) VALUES (SET{6, 9, 9, 4});
INSERT INTO table2 (list_col) VALUES ('LIST{}');
A pair of single ( ' ) or double ( " ) quotation marks can delimit the collection. Double quotation marks are not valid, however, in databases where delimited identifiers are enabled, except to delimit SQL identifiers.
If you are passing a literal collection as an argument to an SPL routine, make sure that there is a blank space between the parentheses that surround the arguments and quotation marks that indicate the beginning and end of the literal collection.