select COL_NAME(object_id('表名'),c.colid)
from sysobjects a,sysindexes b,sysindexkeys c
where a.name=b.name and b.id=c.id and b.indid=c.indid
and a.xtype='PK' and a.parent_obj=object_id('表名')
and c.id=object_id('表名')

 

相关文章:

  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案