A newer version of this documentation is available.

View Latest

Conventions

    +
    The N1QL syntax described in the documentation uses some notational conventions that you need to be familiar with.
    Table 1. Notational conventions for N1QL syntax
    Convention Notation Example Description

    Upper case

    SELECT

    Indicates keywords.

    Single or double quotes

    ' or "

    city = 'London'

    Surrounds expressions that are specific query items. Either single or double quotes can be used.

    Square brackets

    [ ]

    [NOT] BETWEEN

    Indicates optional parts.

    Pipe

    |

    AND | OR

    Separates alternatives.

    Parentheses

    ( )

    COUNT(*)

    Functions to perform an operation.

    Bold square, curly brackets and parentheses

    [], {}, ()

    [element]

    Indicate that the brackets or parentheses are required in the syntax when a N1QL statement is constructed.