row numbers, how to set a row number on my query
Hi,
I wonder why oracle treats rownum field as an ordinary field.
Say I run this query:
SELECT ROWNUM, NAME FROM MYTABLE;
it works nice but if I add an ORDER BY phrase:
SELECT ROWNUM, NAME FROM MYTABLE ORDER BY NAME;
then the rownum field gets shuffled!
I need to have a field as the row number in my query, since it's
the only way to paginate the output, for example displaying the
first 15 rows in the first page...
Any help is so much appreciated
Thanks :)