mysql - select columns dynamically based on list of column names obtained from -
i need simple select statement, based on list of column names dynamic , filtered lower case column names in table. table structure out of control , varies. not possible me know column names before hand - there upper case names (not wanted) , lower case names (wanted). the_table: col_uppercase_1 col_uppercase_2 col_lowercase_1 col_lowercase_2 data1 data2 data3 data4 data5 data6 data7 data8 i can list of column names want using this: select group_concat(column_name) `information_schema`.`columns` (`table_schema` = 'the_database' , `table_name` = 'the_table' , column_name = binary lower(column_name)); which returns list of columns want: +---------------------------------+ | group_concat(column_name) | +---------------------------------+ | col_lowercase_1,col_lowercase_2 | +---------------------------------+ my question: how insert results of query select statement? e.g. select <colum