Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: simple SQL question
You can attach a SEQUENCENO (generated by a sequence ) to your table.
Then create a cursor that points to the rows selected in the DESC order
of the SEQUENCENO, in a sub-program.
cursor%ROWCOUNT will have the total number of rows that have been
fetched so far.
And now if you fetch the first 10 records, they are the ones you are
interested in.
In article <37A82185.A36F8334_at_fast.no>,
kev <kevin.porter_at_fast.no> wrote:
> Hi,
>
> Just wondering - what's the best way to retrieve, say, the latest ten
> entries to a table.
> Does Oracle have a MAXROWS func (I couldn't find one in the docs)
>
> Thanks,
>
> - Kev
>
>
--
Nandakumar
Systems Analyst
New York
(N.Kumar_at_rocketmail.com)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Wed Aug 04 1999 - 09:53:36 CDT
![]() |
![]() |