Examples | AS Phrase | Teradata Vantage - 17.10 - Example: Using AS to Assign a Temporary Name to an Expression - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

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;