# SQL clauses

- CONSTRAINT clause
  A CONSTRAINT clause is an optional part of a CREATE TABLE statement or an ALTER TABLE statement. A constraint is a rule to which data must conform. Constraint names are optional.
- EXTERNAL NAME clause
  The EXTERNAL NAME clause specifies the Java method to be called in a CREATE FUNCTION or CREATE PROCEDURE statement, and it specifies a Java class in a CREATE AGGREGATE or CREATE TYPE statement.
- FOR UPDATE clause
  The FOR UPDATE clause is an optional part of a SELECT statement.
- FROM clause
  The FROM clause is a mandatory clause in a selectExpression.
- GROUP BY clause
  A GROUP BY clause, part of a selectExpression, groups a result into subsets that have matching values for one or more columns.
- HAVING clause
  A HAVING clause restricts the results of a GROUP BY in a selectExpression.
- WINDOW clause
  The WINDOW clause allows you to refer to a window by name when you use a ROW NUMBER function in a selectExpression.
- ORDER BY clause
  The ORDER BY clause is an optional element of several statements, expressions, and subqueries.
- The result offset and fetch first clauses
  The result offset clause provides a way to skip the first N rows in a result set before starting to return any rows. The fetch first clause, which can be combined with the result offset clause if desired, limits the number of rows returned in the result set.
- USING clause
  The USING clause specifies which columns to test for equality when two tables are joined.
- WHERE clause
  A WHERE clause is an optional part of a selectExpression, DELETE statement, or UPDATE statement. The WHERE clause lets you select rows based on a boolean expression.
- WHERE CURRENT OF clause
  The WHERE CURRENT OF clause is a clause in some UPDATE and DELETE statements. It allows you to perform positioned updates and deletes on updatable cursors.

Parent topic: SQL language reference
Related concepts
SQL identifiers
Statements
Built-in system functions
Built-in system procedures
Data types
Related reference
Capitalization and special characters
SQL expressions
JOIN operations
SQL queries
Built-in functions
SYSCS_DIAG diagnostic tables and functions