Some of the results of applying the select list to R depend on whether GROUP BY or HAVING is or is not used.
The select list must either include no functions, or be entirely a list of functions.
If the select includes no functions, then the select list is applied to each row of R, and the result contains as many rows as there are rows in R.
If the select list is a list of functions, then R is the source of the arguments of the functions, and the result of applying the select list is one row.
Each column-name in the select list must either identify a grouping column or be specified within a function.
The select list is applied to each group of R, and the result contains as many rows as there are groups in R. When the select list is applied to a group of R, that group is the source of the arguments of the functions in the select list.
In either case the nth column of the result contains the values specified by applying the nth expression in the operational form of the select list.
A result column derived from a column name acquires the unqualified name of that column. All other result columns have no names.
Each column of the result of SELECT acquires a data type from the expression from which it is derived.
|
Copyright © 2014 CA.
All rights reserved.
|
|