Is it possible to convert multiple rows being result of a subquery to string in MySQL?
What I mean is the following query:
SELECT id,
FUNCTION_THAT_CONVERTS_MUTLIPLE_ROWS_TO_STRING(
SELECT name FROM test2 t2 where t2.id = t.id
) FROM test t;
Where SELECT name FROM test2 t2 where t2.id = t.id returns more than one row.
Yes, you need to use GROUP_CONCAT.