Thursday, 20 September 2012

Query for getting All Primary key and other constraint in SQL SERVER


Select * from  INFORMATION_SCHEMA.TABLE_CONSTRAINTS pk 
 
WHERE pk.CONSTRAINT_TYPE ='PRIMARY KEY' 

Hope this will help you .
Thanks
ROHIT SRIVASTAVA

No comments:

Post a Comment