Column correlation names

<< Click to Display Table of Contents >>

Navigation:  Local SQL > Overview > Conventions >

Column correlation names

Previous pageReturn to chapter overviewNext page
hmtoggle_plus1See also

Use the AS keyword to assign a correlation name to a column, aggregated value, or literal. Column correlation names cannot be enclosed in quotation marks and so cannot contain embedded spaces. In the statement below, the tokens Sub and Word are column correlation names.

SELECT SUBSTRING(Company FROM 1 FOR 1) AS Sub, "Text" AS Word

FROM Customer

Note: Column correlation names cannot be used in all contexts. For instance, column correlation names cannot be used in the SELECT clause other than the original use (such as in other calculations), in the column comparisons that join tables, in comparisons in a WHERE clause, or in a GROUP BY clause. Column correlation names can be used in an ORDER BY clause.