title: MySQL #1093 - You can't specify target table 'giveaways' for update in FROM clause
body: <p>I tried:</p>
  
  <pre><code>UPDATE giveaways SET winner = '1' WHERE ID = (SELECT MAX(ID) FROM giveaways)
  </code></pre>
  
  <p>But it gives:</p>
  
  <blockquote>
    <p>&#35;1093 - You can't specify target table 'giveaways' for update in <code>FROM</code> clause</p>
  </blockquote>
  
  <p><a href="http://verysimple.com/2011/03/30/mysql-cant-specify-target-table-for-update-in-from-clause/" rel="noreferrer">This article</a> seems relevant but I can't adapt it to my query. How can I get it to work?</p>