title: Updating a column in one table with a value in another table
body: <p>At the end of each day I need to set yesterdays price = current price so that the following day I can calculate a change in price. I thought I could do this:</p>
  <pre><code>UPDATE i
  SET i.yesterday_price = p.price
  FROM instruments i
  JOIN prices p ON i.instrument_id = p.instrument_id;
  </code></pre>
  <p>but I get a deadlock error. I'm sure this is easy but a thorough google search does not yield an answer that I can get to work with MySQL.</p>