title: MYSQL - Delete row based on ID-value in other table
body: <p>I have 2 MySQL-tables:</p>
  
  <p>Customer_buyings:</p>
  
  <pre><code>BUY_ID   NUMBER   PLANT_ID    CUSTOMER_ID
    001       5         003          009
    002       1         004          009
    003       2         005          010
  </code></pre>
  
  <p>Plants:</p>
  
  <pre><code>PLANT_ID     PLANTNAME
    003          BUXUS
    ...           ...
  </code></pre>
  
  <p>Now I want to delete one specific row from the "customer-buyings"-table.
  For example the Plant with ID: 003.But I only have the Customer_ID and the PLANTNAME available in my code.</p>
  
  <p>Im searching for a MySQL-query which will delete the 1st row from the Customer_buyings table based on the Customer_id and Plantname (So I would have to compare plantname with plant_id from the other table).</p>
  
  <pre><code>DELETE FROM Customer_buyings
  JOIN Plants
  ON ...
  WHERE ...
  AND Customer_id="009"
  </code></pre>
  
  <p>Any suggestions? Because I couldn't figure it out.</p>