title: How do i declare and increment local variables in db2?
body: <p>I want to show row number for each of result set row, I have this query in mySQL</p>
  
  <pre><code>SELECT @rownum := @rownum + 1 row, e.* FROM Employee e, (SELECT @rownum := 0) r
  </code></pre>
  
  <p>Here @rownum is local variable and would increment its value for each result row.
  How do i write this query in db2 ( ibm's dashdb ) ? </p>