这一种很好用
select group_concat(COLUMN_NAME separator ',') from information_schema.COLUMNS where table_schema='your_database' and table_name = 'your_table_name';
或者
SELECT
GROUP_CONCAT( column_name SEPARATOR ',' )
FROM
information_schema.COLUMNS
WHERE
column_name <> 'con_id'
AND table_name = 'contract'
GROUP BY
table_name