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.
I have a simple select statement and I'd like to get a column containing and incrementing counter along with the results.
eg:
counter data1 data2
0 aa AA
1 bb BB
2 cc CC
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?