Is there a way to use a sub select statement, which returns a list of column names, to be used in the 'select expression' in an outer mySQL expression?
eg
select (
sub select that returns a comma separated list of column names
)
from table1;
In case your wondering how I get the comma separated list of column names, my sub select statement is somethign like...
SELECT group_concat(COLUMN_NAME) FROM information_schema.`COLUMNS`
where table_name = 'table2' group by TABLE_NAME