A text literal is a string that is enclosed by single quotation marks (
') or double quotation marks (
"). If you enable the
ANSI_QUOTES mode, you can use only single quotation marks (
') to enclose strings.
Decimal numeric literals are divided into floating-point values and exact values that consist of integer and fixed-point values. Values can include a decimal point (
.) as a decimal separator. Values that are prefixed with a minus sign (
-) represent negative values.
Hexadecimal numeric literals only support integer values that are prefixed with
0X, and allow letters from
F. All letters are case-insensitive.
Datetime literals can be in the text or numeric format.
- In the text format, you can use full separators, for example,
'2015-07-21 12:34:56.789'. You can also use no separators, for example,
- The numeric format allows you to use only a decimal point (
.) to separate the seconds and microseconds, for example,
A decimal point (
.) must be used between seconds and microseconds. If you require other separators, we recommend that you use only common separators such as hyphens (
-), forward slashes (
/), and colons (
An escape character is a backslash (
\) that invokes an alternative interpretation on the following characters in a character sequence. Escape characters are case-sensitive. For example,
\b represents the backspace and
\B represents the
The following table lists all escape characters.
A form feed.
A line feed.
A carriage return.
A tab character.
A backslash (\).
A single quotation mark (').
A double quotation mark (").
An underscore (_).
A percent sign (%).
ASCII 26 (Ctrl+Z).