String Literals
String literals are specified by one or more characters enclosed in single quotes. The default data type for string literals is varchar, but a string literal can be assigned to any character data type or to the money or date data types without using a data type conversion function.
To compare a string literal with a non-character data type (A), you must either cast the string literal to the non-character data type A, or cast the non-character data type to the string literal type. Failure to do so may result in unexpected results if the non-character data type contains the 'NUL (0) value.
Quotes in Strings
To include a single quote inside a string literal, it must be doubled. For example:
'The following letter is quoted: ''A''.'
which evaluates to
The following letter is quoted: 'A'.
Last modified date: 08/28/2024