Given following query -
SELECT name, age FROM students WHERE age > 22
The result is -
name age
---- ---
Kshitiz 23
Steve 22
Paul 24
How can I number the results sequentially? Like so -
serial name age
------ ---- ---
1 Kshitiz 23
2 Steve 22
3 Paul 24
Please note that using surrogate key is not a solution. Because the surrogate id for record Kshitiz might be 9. I want whatever results are returned from whatever location to be numbered sequentially.

name? – ypercube Dec 27 '12 at 12:12ROW_NUMBER"function". – ypercube Dec 27 '12 at 12:30