Alias in Teradata

In the select statement generally, we have seen selecting the different columns from a table. As a result of the select statement, the output is generated and the first line of the resultset is the column names that we have mentioned in the select statement. Sometimes, the column’s name looks strange and not reader-friendly. In order to make it reader-friendly, we can make use of Teradata Alias.

Apart from the resultset, an alias makes the SQL easier to write. The new alias name can be used anywhere in the SQL statement. We can give alias name to any other objects like tables, views to make easier to write join queries.

Alias in Teradata syntax

select column1 alias1, column2 alias2,...,columnN aliasN
from DatabaseName.TableName;

OR,

select column1 as alias1, column2 as alias2,...,columnN as aliasN
from DatabaseName.TableName;

Alias in Teradata example

select emp_id ID, emp_name Name, department
from teradatapoint.employee;

Output: 

Alias in Teradata