QUERY specification (query spec) 

QUERY specifications ( query spec ) are required to generate an unordered result table in a SELECT statement. A QUERY specification is part of the syntax in a QUERY term (query term) or QUERY term (named query term).

Syntax

<query spec> ::= SELECT [<distinct spec>] <select column>,... <table expression>

distinct spec, select column, table expression

Explanation

A QUERY specification specifies a result table. The result table is generated from a temporary result table. The temporary result table is the result of the table expression.