How to select Unknown Number of Columns in mysql?
问题 Given the table and names of some columns, I have the following Information schema select query. SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA` = 'm_college' AND `TABLE_NAME` = 'm_fee' AND COLUMN_NAME NOT IN ('id', 'classid', 'semid') But this select does not give me the rows value for each unknown column I select. All I got is names of the unknown columns. Is it possible to select the values of the rows so that I can have column as key and rows as value pair in