Example: Using AS to Assign a Temporary Name to an Expression - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantageā„¢ Data Types and Literals

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

This syntax allows the ORDER BY clause to include column names rather than positionally defining the sort columns. The AS keyword is not included when column_2 is renamed to second_value.

SELECT COLUMN1 +100 AS first_value, column_2 second_value
FROM table_1
WHERE second_value > 100
ORDER BY first_value;