title: MySQL | You can't specify target table 'a' for update in FROM clause
body: <pre><code>DELETE FROM table_a WHERE id IN(
      SELECT table_a.id AS id FROM table_a, table_b 
      WHERE table_a.object_id = 1 AND table_a.code = 'code' 
          AND table_a.code = table_b.code 
          AND table_b.id = table_a.b_id 
          AND table_b.table = 'testTable')
  </code></pre>
  
  <p>This is a (somewhat simplified) query I want MySQL to execute. I read on other pages of stackoverflow that this wasn't supported and that it's solvable by using JOINS. How could this be 'transcribed' to a query using JOINS? I find it hard to do so, because I've never tried creating DELETE queries with more than one table.</p>