Reserved Words

N1QL defines an extensive list of keywords that are reserved words.
You cannot use these keywords as identifiers unless you escape them.
All of the N1QL keywords are case insensitive.

Some of the keywords are not currently implemented but are reserved for future use.

Using Reserved Words as Identifiers

N1QL allows escaped identifiers to overlap with keywords.
To use a reserved word as an identifier, you must escape it by enclosing the reserved word inside backticks (`).
For example, if your JSON document contains a field named `index, you can use it in your queries by escaping it like this:

{
"age": "42",
"index": 27,
"name": "Elvis"
}

CREATE INDEX myindex ON default(`index`) USING GSI;

N1QL Reserved Words

The following keywords are reserved and cannot be used as unescaped identifiers: