Previous Next JavaScript must be enabled to correctly display this content

## SELECT Expression

You can query data from the tables using the SELECT expression. Multiple clauses can be used with the SELECT expression. The clauses that can be used in the SELECT expression are given in the syntax below.

Syntax

    select_expression ::=
       SELECT Clause
       from_clause
       [where_clause]
       [groupby_clause]
       [orderby_clause]
       [limit_clause]
       [offset_clause]

Semantics

The SELECT clause and the FROM clause are mandatory.

The processing of the query starts with the FROM clause, followed by the WHERE clause (if any), followed by the GROUP BY clause (if any), followed by the ORDER BY clause (if any), followed by the SELECT clause and finishing with the OFFSET and LIMIT clauses (if any). Each clause produces a set of records, which is processed by the next clause. Each clause is described in the following sections.

If you want to follow along with the examples, create tables and insert data as described in Tables used in the Examples.