Final answer:
In MySQL, an alias for a column is created with the AS keyword in a SELECT statement, providing a temporary name for the column within the query.
Step-by-step explanation:
In MySQL, creating an alias for a column in a SELECT statement is done using the AS keyword. An alias is a temporary name given to a table or column that only exists for the duration of the query. The alias helps make column names more readable or allows them to better reflect their content within the context of the report or code.
To create an alias for a column, you simply follow the column name with the AS keyword and then the alias name. Here's an example:
SELECT column_name AS alias_name FROM table_name;
For instance, if you have a column named customer_id but you want it to appear as ID in your results, you would write:
SELECT customer_id AS ID FROM customers;