title: Define a variable within select and use it within the same select
body: <p>Is there a possibility to do something like this?</p>
  
  <pre><code>SELECT 
      @z:=SUM(item),
      2*@z
  FROM
      TableA;
  </code></pre>
  
  <p>I always get NULL for the second column. The strange thing is, that while doing something like</p>
  
  <pre><code>SELECT 
      @z:=someProcedure(item),
      2*@z
  FROM
      TableA;
  </code></pre>
  
  <p>everything works as expected. Why?</p>