title: MySql How to set a local variable in an update statement (Syntax?)
body: <p>How can I set a variable while doing an Update statement?  I can't seem to figure out the syntax.</p>
  
  <p>So I want something like this below but it's saying the syntax is wrong:</p>
  
  <pre><code>SET @tempVariable := 0;
  UPDATE myTable SET col1 = 5, col2 = @tempVariable, @tempVariable := 100;
  </code></pre>