title: Update with subselect in MySQL
body: <p>How to make the following statement to work in MySQL?</p>
  
  <pre><code>UPDATE my_table t1 SET column_1 = 
  (SELECT column_1 FROM my_table t2 WHERE t2.id = (t1.id - 1))
  WHERE t1.type = 2
  </code></pre>
  
  <p>I am getting a <code>"You can't specify target table 't1' for update in FROM clause"</code> error.</p>