title: The INSERT statement conflicted with the FOREIGN KEY constraint. The conflict occurred in database
body: <p>I have been having this problem for a couple of hours now. In <code>SQL Server</code>, I ran this query :</p>
  
  <pre><code>INSERT INTO USERS_AVATAR(userId, avatId) VALUES ('1', '213');
  INSERT INTO USERS_AVATAR(userId, avatId) VALUES ('2', '312');
  </code></pre>
  
  <p>but the message shows up saying :</p>
  
  <blockquote>
    <p>Msg 547, Level 16, State 0, Line 1<br>
    The INSERT statement conflicted with the FOREIGN KEY constraint "FKUSERS_AVAT731248". The conflict occurred in database "gk314", table "gk314.USERS", column 'userId'.</p>
    
    <p>Msg 547, Level 16, State 0, Line 2<br>
    The INSERT statement conflicted with the FOREIGN KEY constraint "FKUSERS_AVAT731248". The conflict occurred in database "gk314", table "gk314.USERS", column 'userId'.</p>
  </blockquote>
  
  <p>Help please!</p>