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
 General SQL Server Forums
 New to SQL Server Programming
 how do i find out what my primary key is

Author  Topic 

Topaz
Posting Yak Master

199 Posts

Posted - 2008-06-09 : 06:17:30
in my database?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-09 : 06:23:31
sp_help yourtable
Go to Top of Page

Topaz
Posting Yak Master

199 Posts

Posted - 2008-06-09 : 06:26:26
i dont know what that means? or how to use it?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-09 : 06:31:20
or:-

SELECT *
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE Table_Name='YourtableNamehere' AND Constraint_Type='PRIMARY KEY'
Go to Top of Page
   

- Advertisement -