Scalar Literals
Scalar literals are used to represent constant values in expressions and search conditions within an SQL command or query. The following types of literal are supported:
Type | Description |
---|---|
String |
A sequence of characters enclosed in single quotes. A single quote character is itself represented by two immediately adjacent single quote characters. Examples:
'' 'Some Text' 'Don''t stop' |
Integer |
Written as a signed or unsigned integer number. Examples:
0 65535 -50 |
Real |
Written as a floating point number. Examples:
0.5 100.0 5.75E-4 -2.5E12 |
Bit String |
Written either as sequence of 0s and 1s, or as a sequence of hexadecimal digits. Examples:
B'1010110111' X'3CF8' |
All numeric values in SQL use the English decimal point (a dot).