SELECT
COLUMN_NAME
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME = 't_report_apply'
AND TABLE_SCHEMA = 'reporttest'
TABLE_NAME:表名
TABLE_SCHEMA:数据库名
查看除去F_ID以外的所有列名。
SELECT REPLACE
( GROUP_CONCAT( COLUMN_NAME ), 'F_ID', '' ) AS col_list
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME = 't_report_apply_process_record'
AND TABLE_SCHEMA = 'reporttest'