The Literal Row segment specifies the syntax for literal values of named and unnamed ROW data types.
Only Dynamic Server supports this syntax. For expressions that evaluate to field values within a ROW data type, see ROW Constructors.
Literal Row: .-,---------------------------. V | |--+-' ROW--(------| Field Literal Value |---+--) '-+-----------| | .-,---------------------------. | | V | | '- ROW--(------| Field Literal Value |---+--)----' Field Literal Value: (1) |--+-| Quoted String |-----------+------------------------------| | (2) | +-| Literal Number |----------+ +-USER------------------------+ | (3) | +-| Literal DATETIME |--------+ | (4) | +-| Literal INTERVAL |--------+ | (5) | +-| Literal Collection |------+ +-literal_opaque_type---------+ +-'literal_BOOLEAN'-----------+ '-ROW(-| Literal Row |-)------'
Element | Description | Restrictions | Syntax |
---|---|---|---|
literal_opaque_type | Literal representation for an opaque data type | Must be a literal that is recognized by the input support function for the associated opaque data type | Defined by the developer of the opaque data type |
literal_BOOLEAN | Literal representation of a BOOLEAN value | Must be either 't' (= TRUE) or 'f'
(= FALSE) specified as a quoted string |
Quoted String |
You can specify literal values for named ROW and unnamed ROW data types. A ROW constructor introduces a literal ROW value, which can optionally be enclosed between quotation marks.
The format of the value for each field of the ROW type must be compatible with the data type of the corresponding field.
Fields of a row can be literal values for the data types in the following table.
For a Field of Type | Literal Value Syntax |
---|---|
BOOLEAN | t or f, representing TRUE or FALSE |
CHAR, VARCHAR, LVARCHAR, NCHAR, NVARCHAR, CHARACTER VARYING, DATE | Quoted String |
DATETIME | Literal DATETIME |
DECIMAL, MONEY, FLOAT, INTEGER, INT8, SMALLFLOAT, SMALLINT | Literal Number |
INTERVAL | Literal INTERVAL |
Opaque data types | Quoted String
The string must be a literal that is recognized by the input support function for the associated opaque type. |
Collection type (SET, MULTISET, LIST) |
For information on literal collection values as variable or column values, see Nested Quotation Marks. For information on literal collection values for a ROW type, see Literals for Nested Rows. |
Another ROW type (named or unnamed) | For information on ROW type values, see Literals for Nested Rows. |