How to read the syntax diagrams

Syntax diagrams use special components to describe the syntax for SQL statements and commands.

Read the syntax diagrams from left to right and top to bottom, following the path of the line.

The double right arrowhead and line symbol ►► indicates the beginning of a syntax diagram.

The line and single right arrowhead symbol ► indicates that the syntax is continued on the next line.

The right arrowhead and line symbol ► indicates that the syntax is continued from the previous line.

The line, right arrowhead, and left arrowhead symbol ►◄ symbol indicates the end of a syntax diagram.

Syntax fragments start with the pipe and line symbol | and end with the line and pipe symbol.

Required items appear on the horizontal line (the main path).


1  required_item

Optional items appear below the main path.


1  required_item?  optional_item

If you can choose from two or more items, they appear in a stack.

If you must choose one of the items, one item of the stack appears on the main path.


1  required_item
1 required_choice1
1 required_choice2

If choosing one of the items is optional, the entire stack appears below the main path.


1  required_item
1 optional_choice1
1 optional_choice2

If one of the items is the default, it will appear above the main path, and the remaining choices will be shown below.


1  required_item
1! default_choice
1 optional_choice
1 optional_choice

An arrow returning to the left, above the main line, indicates an item that can be repeated. In this case, repeated items must be separated by one or more blanks.


1  required_item +  repeatable_item

If the repeat arrow contains a comma, you must separate repeated items with a comma.


1  required_item + , repeatable_item

A repeat arrow above a stack indicates that you can make more than one choice from the stacked items or repeat a single choice.

SQL keywords appear in uppercase (for example, FROM). They must be spelled exactly as shown. Variables appear in lowercase (for example, column-name). They represent user-supplied names or values in the syntax.

If punctuation marks, parentheses, arithmetic operators, or other such symbols are shown, you must enter them as part of the syntax.

Sometimes a single variable represents a syntax segment. For example, in the following diagram, the variable parameter-block represents the syntax segment that is labeled parameter-block:


1  required_item %parameter-block
parameter-block

1 parameter1
1  parameter2
2.1 parameter3
2.1 parameter4