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
 FK PK

Author  Topic 

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2009-01-13 : 22:30:17
How do you designate a column as the Foreign Key and or Primary Key in a query in SQL 2005 (I am using the free version!)?

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-13 : 22:39:46
Books online has details.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-13 : 22:47:47
either add that with create table as below
http://doc.ddart.net/mssql/sql70/create_7.htm

or add it separately as a constraint using alter table add constraint...
Go to Top of Page
   

- Advertisement -