A column alias assigns a temporary name to a column or expression in the query result.
Readable column names are important when SQL results are used in reports, dashboards, exports, or business analysis.
The expression Salary * 12 can be given the alias AnnualSalary.
SELECT
EmployeeName,
Salary * 12 AS AnnualSalary
FROM Employees;
Column aliases are commonly used for calculations, aggregate functions, reporting fields, and business-friendly output.
- Column aliases rename output headings.
- They can be used with expressions.
- They can be used with aggregate functions.
- They improve report readability.
- They do not normally change the underlying table.
What is a column alias?
A column alias is a temporary name assigned to a column or expression in a query result.
Can an expression have an alias?
Yes. Calculated expressions can be assigned meaningful column aliases.