The diagram for Literal Collection refers to this section. Elements of a collection can be literal values for the following data types.
For a Collection of Type | Literal Value Syntax |
---|---|
BOOLEAN | t or f, representing TRUE or FALSE as a quoted string |
CHAR, VARCHAR, NCHAR, NVARCHAR, CHARACTER VARYING, LVARCHAR, 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 literal must be recognized by the input support function for the associated opaque type. |
Row Type | Literal Row. When the collection element type is a named ROW type, you do not need to cast the inserted values to the named ROW type. |
Quoted strings must be specified with a different type of quotation mark than the quotation marks that encompass the collection, so that the database server can parse the quoted strings. Thus, if you use double ( " ) quotation marks to specify the collection, use single ( ' ) quotation marks to specify individual, quoted-string elements. (In databases where delimited identifiers are enabled, however, double quotes are not valid, except to delimit SQL identifiers.)
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]