1、纵向列出所有字段 SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'tablename'; 2、横向列车所有字段,以‘,’分隔 SELECT STUFF((SELECT ', ' + column_name FROM information_schema.columns WHERE table_name = 'tablename' FOR XML PATH('')), 1, 2, '') AS all_columns