title: Update the row that has the current highest (maximum) value of one field
body: <p>I have this SQL query, which is wrong. I want to update the field &quot;prevmonth&quot; in the <em>wins</em> table, but only for the record that has the maximum value for the field &quot;month_wins&quot;.</p>
  <pre><code>UPDATE wins
  SET prevmonth_top=1
  WHERE month_wins = (SELECT MAX(month_wins) FROM wins)
  </code></pre>
  <p>Error message:</p>
  <blockquote>
  <p>#1093 - You can't specify target table 'wins' for update in FROM clause</p>
  </blockquote>
  <p>But how can I do this?</p>