msyql查询表的索引sql语句
select table_name,
GROUP_CONCAT(distinct convert(column_name,char) separator',') as '列名',
index_name as '索引名'
from information_schema.STATISTICS
where table_schema='库名' and table_name='表名'
GROUP BY table_name,index_name
order by table_name,index_name