16.10 - Example: Using AS to Assign a Temporary Name to an Expression - Teradata Database

Teradata Database SQL Data Types and Literals

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Programming Reference
featnum
B035-1143-161K

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;