Literal Row
The Literal Row segment specifies the syntax for literal values of named and unnamed ROW data types.
For expressions that evaluate to field values within a ROW data type, see ROW constructors.
Syntax
- 1 See Quoted String
- 2 See Literal Number
- 3 See Literal DATETIME
- 4 See Literal INTERVAL
- 5 See Literal Collection
| 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 |
Usage
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.
| 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 |
| BIGINT, 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. |