select name from syscolumns c where exists (select * from syscomments m where c.colid=m.colid and id in(select id from sysobjects o where type='c' and c.id=o.parent_obj and name='约束名'))
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 name='索引名'))