title: How to Delete data from 2 tables using JOIN in SQLITE
body: <p>I have the below tables </p>
  
  <p><img src="https://i.stack.imgur.com/WsZnT.png" alt="Tables Structure"></p>
  
  <p>I want to delete the data corresponding to the <strong>productId</strong> from both the tables. I have studied that JOIN can not be applied with DELETE in sqlite so i have tried the below query</p>
  
  <pre><code>DELETE FROM optionToValues WHERE optionToValues.optionId   IN
  (SELECT optionToValues.optionId
  FROM optionToValues 
  JOIN productOptions on productOptions.optionId = optionToValues.optionId 
  WHERE productOptions.product_id = 82)
  </code></pre>
  
  <p>But no delete operation is performed. Please suggest me something how we can achieve this. Any help is appreciated. </p>