title: not able to create Foreign key in sql server table
body: <p>I have two table like this:</p>
  
  <p><code>tblGender</code></p>
  
  <p><img src="https://i.stack.imgur.com/6faKz.png" alt="enter image description here"></p>
  
  <p>and <code>TblPerson</code></p>
  
  <p><img src="https://i.stack.imgur.com/g8aho.png" alt="enter image description here"></p>
  
  <p>I want to set foreign key for <code>GenderID</code>.. but I'm getting this error:</p>
  
  <blockquote>
    <p>The ALTER TABLE statement conflicted with the FOREIGN KEY constraint
    "tblPerson_GenderID_FK". The conflict occurred in database "Sample",
    table "dbo.tblGender", column 'id'.</p>
  </blockquote>