I did some research and came only if GROUP_CONC is changing column names correctly. But the problem is that
SELECT (SELECT GROUP_CONCAT( cols.column_name) FROM (SELECT column_name FROM information_schema.columns WHERE table_name='test_table') as cols) FROM test_table
will return the same concatenated row containing column names once for each row of the table, instead of evaluating it as column names for an external select statement and return the actual values.
From what I read in all the forums discussing this issue (and there were many), there really is no way to make this work without prepared statements.
I can only think of one other way to do this, and that will have a highlighted column in each table, where you combine the individual column values โโinto INSERT or UPDATE, so you can just select this one field instead of a full set of fields.
source share