The SQL statement syntax in this reference shows all the clauses, object types and predicates that can be incorporated into a particular statement. The following standard notation conventions are used in the statement syntax:
- Italics are used to distinguish general parameter information and data object categories in a statement syntax. The clause "PASSWORD
password," for example, contains the keyword PASSWORD, and the parameter
password (indicating that the user should supply a password).
- Square brackets ( [ ] ) enclose optional items in a command statement. Do not type the brackets. For example, the statement "COMMIT [WORK]" indicates that the keyword COMMIT must be used, but the keyword WORK is optional.
- Ellipses ( ... ) indicate that the preceding item may be repeated one or more times. Do not type the ellipses.
- Ellipses are sometimes preceded with a comma ( ,... ) indicating that the preceding item may be repeated one or more times, with each repeated item separated from the last by a comma. For example, the clause "column-name [,...]" indicates that at least one column name must be specified, with an option to add any number of other column names (with each column name separated from the last by a comma).
- Vertical bars ( | ) indicate that whatever item precedes the bar can be replaced by the item following the bar. This character operates as an OR conjunction, offering a choice between the item appearing before and after. Do not type the vertical bar.
- Braces ( { } ) group items to be selected as a single element of the command statement. One item within the braces must be chosen. For example, "{A | B}" means choose either A or B. Do not type the braces.
- Parentheses appearing within the statement syntax are part of the statement syntax and need to be typed as shown.
- Underlined items indicate a default option. For example, "PRIQTY {3 |
integer}" indicates that the PRIQTY clause has a default value of three. The statement "SELECT [ALL | DISTINCT]" indicates that SELECT (by itself) is interpreted the same as SELECT ALL.
More:
-
Syntax Support Only
-
Case Sensitivity
-
Comments
-
Line Continuation