1.mysql查詢表的所有字段
select COLUMN_NAME,column_comment from INFORMATION_SCHEMA.Columns where table_name='表名' and table_schema='數據庫名';
2.mysql拼接所有字段,方便寫sql
select group_concat( COLUMN_NAME separator ', ') from INFORMATION_SCHEMA.Columns where table_name='表名' and table_schema='數據庫名';
