查找当前数据库中表的索引信息
select db_name() as 数据库名,d.name as 表名,b.name,c.name,case when a.indid=1 then N'聚集索引' else '非聚集索引' end as 类型 from sysindexkeys a,sysindexes b,syscolumns c,sysobjects d where a.id=b.id and d.id=a.id and a.indid=b.indid and c.id=a.id and c.colid=a.colid and d.id=a.idand b.name not like '_WA_Sys%'