title: MySQL update from not working - syntax error 1064
body: <p>I have a table that contains an oldid and an oldparid. I want to update the rows where row.oldpar = otherrow.oldid but I'm having a problem with my query.</p>
  
  <pre><code>UPDATE 01_menu_main SET parid = x.newpar
  FROM (SELECT oldid, id as newpar FROM 01_menu_main) x
  WHERE x.oldid = 01_menu_main.oldpar
  </code></pre>
  
  <p><strong>The error I'm receiving is this</strong></p>
  
  <p><a href="https://i.stack.imgur.com/GYrXI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GYrXI.png" alt="enter image description here"></a></p>
  
  <p>Is there something I'm missing? Thanks!</p>