MySQL Alias

MySQL Alias keyword can be used to temporarily rename the column names, or table names within a Database. An alias only exists for the duration of the query

  • COLUMN ALIASES can be used to make column headings in your result set easier to read.
  • TABLE ALIASES can be used to make it easier to read or when you are performing a self join.

Alias Column Syntax:

SELECT column_name AS alias_name FROM table_name;

Alias Table Syntax:

SELECT column_name(s) FROM table_name AS alias_name;