某天有个需求想要获得某张表的所有字段,经过查询,得到下面的语句,亲测可用,记一笔! select column_name from information_schema.COLUMNS where table_name='表名';