select name from syscolumns c where exists (select colid from
sysindexkeys k WHERE k.colid=c.colid and k.id=c.id and exists (select id from sysindexes i where i.id=k.id and i.indid=k.indid and id=object_id(N'表名')))
sysindexkeys k WHERE k.colid=c.colid and k.id=c.id and exists (select id from sysindexes i where i.id=k.id and i.indid=k.indid and id=object_id(N'表名')))
select name from syscolumns c
join sysindexkeys k on k.id=c.id and k.colid=c.colid
where k.id=object_id(N'xskc')