NAME_CONST
Syntax
NAME_CONST(name,value)
Description
This function returns the specified value. The value parameter should be a constant.
NAME_CONST() specifies the name of the column in the generated result set.
Examples
SELECT NAME_CONST('my_id', 101);
+-------+
| my_id |
+-------+
| 101 |
+-------+
1 row in set (0.001 sec)
You can also achieve the same result as in the previous example by setting a simple alias, as shown below:
SELECT 101 AS my_id;