Creating foreign key in SQL Server Management Studio
Asked Answered
K

1

14

Using SQL Server 2008 R2 I am trying to establish a relationship between two companies. For the sake of illustration; one table is called 'company', another is called 'branch'. Company and branch both have primary keys. Company should relate to Branch in a one to many relationship. A row called 'branches' should be the foreign key in the table Company; linked to the primary key of the Branch table.

Naturally I go for the 'relationships' option in the Table designer menu in SSMS. But this is as far as I get.

foreign key relationships SSMS

The Tables and Columns Specification Table entries looks editable - but apparently isn't.

This is very confusing o.O Anybody know how to... edit it?

Kessiah answered 24/7, 2012 at 11:1 Comment(0)
J
20

Click on the ... at the right of the "Tables and Columns Specification"

Jackboot answered 24/7, 2012 at 11:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.