title: How to DELETE a record which has foreign keys - MySQL Java
body: <p>I have a table that looks like this</p>
  
  <pre><code>Car ID     Car Name     Part ID      Stock ID 
  ___________________________________________________
  1          Audi          1             1
  
  2          Benz          2             2
  
  3          Corsa 1.3     3             3
  
  4          Corsa 2.0     3             4
  </code></pre>
  
  <p>Now if I want to delete <code>Corsa 1.3</code>, it says <code>Foreign key constraint</code> Part ID. It can't delete it because of Part ID.</p>
  
  <p>How do I fix this?</p>