Clauses

    A clause defines a certain type of directive in a statement. For instance, the clause in a SELECT statement and in some other data manipulation statements (UPDATE, DELETE) specifies criteria for searching one or more tables for the rows that are to be selected, updated or deleted. The clause specifies how the output data — result set — should be sorted.

    Options, being the simplest constructs, are specified in association with specific keywords to provide qualification for clause elements. Where alternative options are available, it is usual for one of them to be the default, used if nothing is specified for that option. For instance, the SELECT statement will return all of the rows that match the search criteria unless the DISTINCT option restricts the output to non-duplicated rows.

    Keywords

    For instance, the following statement will be executed without errors because, although is a keyword, it is not a reserved word.

    On the contrary, the following statement will return an error because ADD is both a keyword and a reserved word.

    1. CREATE TABLE T (ADD INT NOT NULL);