天天看点

mysql查询表中字段名称

select column_name from information_schema.columns where table_name='表名称' and table_schema='库名称'

当然也是可以对column_name进行扩展,例如concat(column_name,','),还是比较简单的