Previous Next JavaScript must be enabled to correctly display this content

## Literals

A literal (a.k.a constant value) is a fixed value appearing in the query text. There are four kinds of literals: numbers, strings, boolean values, and the JSON NULL value. The following production rules are used to recognize literals in the query text. The Constant Expressions section describes how the tokens listed below are translated into instances of the data model.

Syntax

    INT_CONSTANT ::= DIGIT+
    FLOAT_CONSTANT ::=
       (DIGIT* '.' DIGIT+ [(E|e) [+|-]  DIGIT+]) |
       (DIGIT+ (E|e) [+|-] DIGIT+)
    NUMBER_CONSTANT ::= (FLOAT_CONSTANT | INT_CONSTANT) (N|n)
    STRING_CONSTANT ::= '\'' [(ESC|.)*] '\''
    DSTRING_CONSTANT ::= '"' [(ESC|.)*] '"'
    ESC ::= '\\' ([\'\\/bfnrt]|UNICODE)
    DSTR_ESC ::= '\\' ([\"\\/bfnrt]|UNICODE)
    UNICODE ::= 'u'HEX HEX HEX HEX
    TRUE ::= (T|t)(R|r)(U|u)(E|e)
    FALSE ::= (F|f)(A|a)(L|l)(S|s)(E|e)
    NULL ::= (N|n)(U|u)(L|l)(L|l)

Note:

The literals TRUE, FALSE, and NULL are reserved words.