The SELECT clause specifies the columns of the final result table.
.-ALL------. >>-SELECT--+----------+-----------------------------------------> '-DISTINCT-' >--+-*-------------------------------------------+------------->< | .-,---------------------------------------. | | V | | '---+-expression--+---------------------+-+-+-' | | .-AS-. | | | '-+----+--column-name-' | +-table-name.*------------------------+ +-view-name.*-------------------------+ '-correlation-name.*------------------'
The column values are produced by the application of the select list to R. The select list is the names or expressions specified in the SELECT clause, and R is the result of the previous operation of the subselect. For example, if the only clauses specified are SELECT, FROM, and WHERE, R is the result of that WHERE clause.
DISTINCT
is not allowed if the select-list contains a DATALINK or XML
column, or an expression that returns a value that is the XML data
type.