This specification uses EBNF meta-syntax to specify the grammar of SQL for Oracle NoSQL Database. The following EBNF notations apply:
- Upper-case words are used to represent keywords, punctuation characters, operator symbols, and other syntactical entities that are recognized by EBNF as terminals (aka tokens) in the query text. For example,
SELECTstands for the "select" keyword in the query text. Notice that keywords are case-insensitive; "select" and "sELEct" are both the same keyword, represented by the SELECT terminal.
- Lower-case words are used for non-terminals. For example,
array_step : [expression]means that array_step is an expression enclosed in square brackets.
- " " Anything enclosed in quotes is also considered a terminal. For example, the following production rule defines the value-comparison operators as one of the =, >= symbols: For example,
val_comp : "=" | ">=".
- * means 0 or more of whatever precedes it. For example,
field_name*means 0 or more field names.
- + means 1 or more of whatever precedes it. For example,
field_name+means 1 or more field names.
-  means optional, i.e., zero or 1 of whatever contained in it. For example,
[field_name]means zero or one field names.
- | means this or that. For example,
INT | STRINGmeans an integer, or a string.
- () Parentheses are used to group EBNF sub-expressions together. For example,
(INT | STRING) [comment]means an integer, or a string, followed by a comment, or just an integer, or a string, followed by nothing.