You can use the following syntax to declare an SPL variable as a typed or generic collection, or as a named, unnamed, or generic ROW data type.
Complex Data Types (Subset): |--+-COLLECTION--------------------------------------------------------------+--| +-+-SET------+--(--+-data_type-------------------------------+--NOT NULL)-+ | +-MULTISET-+ '-+-SET------+--(--data_type--NOT NULL--)-' | | '-LIST-----' +-MULTISET-+ | | '-LIST-----' | '-+-row---------------------------------+---------------------------------' '-ROW--+----------------------------+-' | .-,----------------. | | V | | '-(----field--data_type-+--)-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
data_type | Type of elements of a collection or of fields of an unnamed ROW type | Must match the data type of the values that the variable will store. Cannot be SERIAL, SERIAL8, TEXT, BYTE, CLOB, or BLOB. | Data Type |
field | Field of unnamed ROW | Must exist in the database | Identifier |
row | Named ROW data type | Must exist in the database | Identifier |