Hitachi

Hitachi Advanced Database SQL Reference


1.1.3 Relationship between SELECT statement syntax and its constituent elements

This subsection describes how the syntax of the SELECT statement is broken down into its constituent elements. The following figure shows the relationship between the SELECT statement syntax and its constituent elements.

Figure 1‒1: Relationship between SELECT statement syntax and its constituent elements

[Figure]

The following describes each constituent element.

Query specification:

The query specification is the part of the statement that specifies the search conditions, the table to be searched, and the column from which retrieval results are to be extracted.

Selection list:

The selection list specifies items to be extracted as retrieval results. It is typically a column name, but set functions can also be specified.

Table expression:

The FROM clause, WHERE clause, GROUP BY clause, and HAVING clause are referred to collectively as table expressions.

ORDER BY clause

Specify this when you want the retrieval results sorted in ascending or descending order. For examples, see 1.3 Sorting retrieval results (ORDER BY clause).

LIMIT clause

Specify this when you want to set an upper limit on the number of rows in the retrieval results. For examples, see 1.4 Specifying the maximum number of rows of retrieval results (LIMIT clause).

Note

For details about the syntax of a query specification, selection list, or table expression, see the following.