Mega Code Archive

 
Categories / MySQL / Table Index
 

Aliases can be applied to any result set column, not just those that come from tables

mysql> mysql> mysql> SELECT '1+1+1' AS 'The expression', 1+1+1 AS 'The result'; +----------------+------------+ | The expression | The result | +----------------+------------+ | 1+1+1          |          3 | +----------------+------------+ 1 row in set (0.00 sec) mysql>