select c.name from sysobjects o,sysindexes i,sysindexkeys k,syscolumns c
where o.xtype='PK'
and o.parent_obj=object_id('表名')
and i.id=o.parent_obj
and i.name=o.name
and k.id=o.parent_obj
and k.indid=i.indid
and c.id=o.parent_obj
and c.colid=k.colid
order by k.keyno