Character literals must be prefixed and suffixed by a single quote character.
If the "Use Quoted Delimiters" option is not selected in the data dictionary, then character literals can also be prefixed and suffixed by a single double quote character.
The data type of a character literal is SQL Char, unless the literal contains a character outside of the Latin character set. If the literal contains a character with a code point greater than 255, its data type is SQL Unicode.
The precision of the literal will be the count of all characters inside the quotes.
An empty string will be treated a varchar(1) field, with a space.
Examples of Character Literals:
Literal |
Data Type |
---|---|
'abcdef' |
Char(6) |
'abcdefg' |
Char(7) only if "Use Quoted Delimiters" is disabled; otherwise this is treated as an identifier |
'' |
Unicode(7) |
'' (empty quotes) |
Varchar(1) |