What I\'d like to be able to do in SQL Server 2005 somehow is with a table name as input determine all the fields that make up the primary key. sp_columns doesn
sp_columns
select * from information_schema.Table_Constraints where Table_Name = @tableName
See this MSDN Listing for Table Constraints.