Column aliases (AS)

A column alias, defined with AS, gives a name to a column or expression in the result. It makes calculations readable and provides explicit headers. Depending on the database, an alias defined in SELECT cannot be used in WHERE, but can be used in ORDER BY.

Example

SELECT prix * quantite AS total FROM lignes;

Related concepts

The whole glossary