In a MySQL SELECT statement, how can a derived field use the value of another field in the SELECT list?
For example, when you run the following query:
SELECT 'tim' AS first_name ,first_name || ' example' AS full_name;
I expect the result to be:
first_name, full_name tim , tim example
Instead, I get the following error :
Unknown column 'first_name' in 'field list'.
Is there a way I can refer to another column?
thanks
Turgs
Turgs source share