Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Keys from System Tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-06-17 : 19:53:54
Paul writes "I currently use sysobjects and syscolumns to retrieve the table and fields within tables.

I need to know which of the fields in each of the tables are used in the primary key of the table. I don't care about indexes just primary keys.

I have tried using sysindexkeys but there doesn't seem to be a way to distinguish primary keys and indexes.

Thanks
Paul"
   

- Advertisement -