title: MySQL DELETE FROM with UNION subquery by IN condition
body: <p>I have tripped up on a curious SQL error. The last query doesn't work. Of course I can just split that DELETE into three queries, but I really wonder why MySQL doesn't let me do it this way.</p>
  
  <p>A little example:</p>
  
  <pre><code>(SELECT id FROM stairs WHERE building = 123)
  UNION
  (SELECT id FROM lift WHERE building = 123)
  UNION
  (SELECT id FROM qrcodeid WHERE building = 123)
  </code></pre>
  
  <p>works!</p>
  
  <pre><code>DELETE FROM startpoint WHERE id IN (SELECT id FROM stairs WHERE building = 123)
  </code></pre>
  
  <p>works, too!</p>
  
  <p>Whereas</p>
  
  <pre><code>DELETE FROM startpoint WHERE id IN (
      (SELECT id FROM stairs WHERE building = 123)
      UNION
      (SELECT id FROM lift WHERE building = 123)
      UNION
      (SELECT id FROM qrcodeid WHERE building = 123)
  )
  </code></pre>
  
  <p>raises the error</p>
  
  <blockquote>
    <p>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNION (SELECT id FROM lift WHERE building = 123) UNION (SELECT id FROM qrc' at line 3</p>
  </blockquote>
  
  <p>Anyone a clue? </p>