Declaration
NAME_CONST(name,value)
Description
The return value of this function is a constant. The parameter value should be a constant.
NAME_CONST() gives the generated result set columns specified names.
Examples
obclient> SELECT NAME_CONST('my_id', 101);
+-------+
| my_id |
+-------+
| 101 |
+-------+
1 row in set
You can also achieve exactly the same result as in the preceding example by setting up simple aliases, as shown below:
SELECT 101 AS my_id;