SQL Aliases - SQL Tutorial
SQL aliases can be used with database tables and with database table columns, depending on task you are performing.
SQL column aliases are used to make the output of your SQL queries easy to read and more meaningful:
SELECT Employee, SUM(Hours) As SumHoursPerEmployee
GROUP BY Employee
In the example above we created SQL alias SumHoursPerEmployee and the result of this SQL query will be the following:
Consider the following SQL statement, showing how to use SQL table aliases:
FROM EmployeeHours AS Emp
Here is the result of the SQL expression above:
The SQL table aliases are very useful when you select data from multiple tables.