I try to set the result of a select in a variable(To show it in my result) but I obtain an error
This is my code :
SELECT 8_Type,SET @var= (select Name from variables where Ch8_ID = variables.ID)
FROM TTable ;
and when I change my code like bellow, this is what I want but I need to change the name of the column :
SELECT 8_Type, (select Name from variables where Ch8_ID = variables.ID)
FROM TTable ;![enter image description here][1]
I obtain in the column the query like this image.
