• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 453
  • Last Modified:

sysforeignkeys equivalent for PK

What will be the equivalent of sysforeignkeys for Primary Keys?

Thanks
0
anushahanna
Asked:
anushahanna
1 Solution
 
chapmandewCommented:
select * from sysconstraints
0
 
anushahannaAuthor Commented:
how do you filter only the PKs
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
This would do:

select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where CONSTRAINT_TYPE = 'PRIMARY KEY'
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now