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
 Transact-SQL (2000)
 primary key

Author  Topic 

kalyan45
Starting Member

2 Posts

Posted - 2003-02-03 : 01:36:37
hi to all

how to make a list of all the primary keys of a database

thxs in advance

kalyan

kalyan

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-02-03 : 02:28:36
Please dont cross-post, its off-putting enough to have your question not answered at all.

Now about your question, try this:

SELECT * FROM sysobjects WHERE xtype = 'PK'

But its not of much use this way...

OS



Edited by - mohdowais on 02/03/2003 02:31:35
Go to Top of Page
   

- Advertisement -