Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Getting the first row using ORDER BY
Oracle assigns the values of the pseudocolumn ROWNUM before it applies
the ORDER BY clause. How would one obtain the first row of the ordered
result set ?
One solution is to declare a cursor using the ORDER BY clause. Then by
opening
the cursor and fetching only the first row, this row may be obtained.
This seems
sloppy, however.
Any suggestions ? Received on Mon May 11 1998 - 14:05:48 CDT
![]() |
![]() |