title: Creating foreign key in Visual Studio 2010
body: <p>I'm trying to create 2 tables in Visual Studio server pane and I have a problem creating the foreign keys.</p>
  
  <p>When I'm trying to create them in the relationship page it won't let me create foreign keys until I make them primary keys.</p>
  
  <p>I don't understand why I can't have a different member in my table that it is primary key and a different one a foreign key.</p>
  
  <p>My tables are like this:</p>
  
  <p><strong>Table People:</strong></p>
  
  <pre>
  Primary key: ID int
               Name nvarchar
               Age int
               City nvarchar
  Foreign key: AccountNumber int  --> when I make him primary key everything works.
  </pre>
  
  <p><strong>Table BankAccount:</strong></p>
  
  <pre>    
  Primary key and Foreign Key: AccountNumber  int
                               Money float
  </pre>
  
  <p>ps.
  I used some mysql with CMD and I remember that I could do this, but because I don't have this control in visual studio I'm lost.</p>
  
  <p>UPDATE:
  Rup made a good point that i only relize afther answering the qustion he ask me
  i just did the realtionship (Foreign Key) for the bank account table and now i got
  what i wanted thank you!</p>