An alias is a feature of SQL that is supported by most, if not all, relational database management systems (RDBMSs).
[1] A programmer can use an alias to temporarily assign another name to a table or column for the duration of the current SELECT query.
Here is some sample data that the queries below will be referencing: Using a table alias: We can also write the same query like this (Note that the AS clause is omitted this time): A column alias is similar: In the returned result sets, the data shown above would be returned, with the only exception being "DepartmentID" would show up as "Id", and "DepartmentName" would show up as "Name".
This syntax is often used with expressions that do not produce useful table and column names, such as VALUES[4] and UNNEST.
[5] As an example, one may conveniently test the above SQL statements without creating an actual Departments table by using expressions such as