title: Sybase add incrementing counter to a select statement
body: <p>It seems that a similar question has been asked an solutions exist for other DB products (especially MS-SQL) but they don't work for sybase so I'm asking this question.</p>
  
  <p>I have a simple select statement and I'd like to get a column containing and incrementing counter along with the results.</p>
  
  <p>eg:</p>
  
  <pre><code>counter  data1  data2
  0        aa     AA
  1        bb     BB
  2        cc     CC
  </code></pre>
  
  <p>Is there a way to do this in a single statement as opposed to putting it into a temp table and running a cursor over it?</p>