A column alias allows you to assign a column or an expression in the select list of a SELECT statement a temporary name. The column alias exists temporarily during the execution of the query.
The following illustrates the syntax of using a column alias:
```
SELECT column_name AS alias_name
FROM table_name;
```
In this syntax, the column_name is assigned an alias alias_name. The AS keyword is optional so you can omit it like this:
```
SELECT column_name alias_name
FROM table_name;
```
The following syntax illustrates how to set an alias for an expression in the SELECT clause:
```
SELECT expression AS alias_name
FROM table_name;
```
The main purpose of column aliases is to make the headings of the output of a query more meaningful.
```
SELECT
first_name,
last_name AS surname
FROM customer;
```