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 Administration (2000)
 how do I find all the primary keys in sql 2000?

Author  Topic 

aliyesami
Starting Member

30 Posts

Posted - 2008-08-25 : 16:12:39
for finding foreign keys in sqlserver 200 there is a view sysforeignkeys
but whats the view for finding out the primary kyes in sql 2000?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-25 : 16:28:30
select *
from information_schema.table_constraints
where constraint_type = 'PRIMARY KEY'

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -