Notations used in SQL-syntax representation
- Red italics is used for syntactic elements to be substituted by the names
of the elements or by the structure identified. For example, table_name
should be substituted by a name of some table.
- Bold black is used for SQL keywords, for example, 'create table'.
Commas are used in SQL as separators. Parentheses also belong to SQL.
- Brackets indicate an optional part of statement [ optional
part ]. Brackets do not belong to SQL.
- Braces enclose a list of choices. One of the choices must be taken.
The choices are separated by bars, for example,
{
choice 1 | choice
2 | choice 3 }.
Braces and bars
do not belong to SQL.
- Three dots '...' indicate that the preceding
element may be repeated. A comma followed by three dots ',...'
indicates that the preceding element may be repeated and the elements are
separated with commas.
- Some statements end with a semicolon. A semicolon and an empty line are
used to separate statements. The need for semicolon at the end an
SQL-statement depends on the execution environment. Many SQL interpreters
demand it.