Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: selecting _only_ the latest ten items
Hi,
If you're using Oracle, you may use the rownum pseudocolumn to filter your 10 latest rows out :
select * from (select * from news order by date desc) where rownum between 0 and 10;
-timo
> What's the best way of selecting, say, the latest 10 news stories from a
> DB. Do I have to select all the items ordered by date, but just show the
[...]
> are displayed, etc.
>
> TIA,
> - Kev
--
+---+---+-+-+-+-+ | | |-+-+-+-+ Fraunhofer-Institut fuer Graphische Datenverarbeitung +---+---+-+-+-+-+ Fraunhofer-Institute for Computer Graphics | | |-+-+-+-+ Abteilung / Department : Document Imaging +---+---+-+-+-+-+ | __ _ | Timo Biesenbach | ! ! _ ! \ | Rundeturmstr. 6 phone ++49 6151 155 578 | ! !__! !_/ | 64283 Darmstadt fax ++49 6151 155 299 +---------------+ Germany email timo.biesenbach_at_igd.fhg.deReceived on Tue Sep 07 1999 - 07:07:53 CDT
![]() |
![]() |