title: MySQL error 1452 (23000) cannot add or update a child row a foreign key constraint fails
body: <p>This is what I entered for the tables</p>
  
  <pre><code>mysql&gt; create table A6M351kjp.Claim (ClaimID INT (10) NOT NULL, VIN INT (10) NOT NULL, ClaimDate DateTime Null, ClaimStatus VarChar(45) Null, Primary Key (ClaimID));
  </code></pre>
  
  <p>added foreign key here</p>
  
  <pre><code>mysql&gt; alter table A6M351kjp.Claim add foreign key (VIN) references Car(VIN);
  </code></pre>
  
  <p>enter data</p>
  
  <pre><code>mysql&gt; insert into A6M351kjp.Claim (ClaimID, VIN, ClaimDate, ClaimStatus) values (101, 901, '2014-01-01', 'Open');
  ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`A6M351kjp`.`Claim`, CONSTRAINT `Claim_ibfk_1` FOREIGN KEY (`VIN`) REFERENCES `Car` (`VIN`))
  </code></pre>
  
  <p>what is cause of this error and how can I fix this?</p>
  
  <p>Thanks</p>