Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: instead of SELECT TOP: cursors or nested queries?
Maybe this helps:
LIMIT and ORDER BY with Oracle9i R2:
SELECT Feldliste FROM (SELECT Feldliste,ROWNUM AS R$ FROM Tabelle,DUAL D WHERE NAFI=D.DUMMY(+) AND Filter ORDER BY Reihenfolge) WHERE R$ BETWEEN 1 AND TopNumber
Tabelle = table name
NAFI = any field name of 'Tabelle'
Feldliste = list of SELECT fields
Filter = some conditions
Reihenfolge = list of ORDER BY fields
Gruss
Marcus (Oracle-Newbie)
Germany
Received on Fri Jan 09 2004 - 04:21:35 CST
![]() |
![]() |