Unanswered: How to extract all Primary Keys in a RS ?(SQLServer 2k)
i´d like to know how can i get all PK´s and their respective table name listed in a result set.
I did something similar to list all FKs (using the sysforeingkeys table), but there is no ´sysprimarykeys´.
What i am trying to do is to document the database in 2 tables, one for tables and one for columns. Similar to the sys* views, but i will add description, comments, etc. This way documentation can be viewed with a single select, or a view to the programmers. AND WE hope we can keep it up to date more easily than printed sutff.