UnDocumented stored proc to find the primary key and foreign key Constraints defined on a table | SansSQL

Friday, July 11, 2008

UnDocumented stored proc to find the primary key and foreign key Constraints defined on a table

EXEC sp_MStablekeys @TableName

sp_MStablekeys is an undocumented stored procedure to find all the primary keys and foreign keys defined on a particular table in SQL 2000 and SQL 2005.
This Stored procedure accepts a parameter @TableName and gives the primary keys and foreign keys defined on a that table.

2 comments:

Post a Comment

Ads