QUERY specification (named_query_spec)
QUERY specifications (
named_query_spec ) are required to generate an unordered result table in a SELECT statement (named_select_statement). A QUERY specification is part of the syntax in a QUERY term (named_query_term).Syntax
<named_query_spec> ::= SELECT [<distinct_spec>] <result_table_name> (<select_column>,...) <table_expression>
distinct_spec, result_table_name, select_column, table_expressionExplanation
A QUERY specification specifies a result table with the name
result_table_name . The result table is generated from a temporary result table. The temporary result table is the result of the table expression.