Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: simple SQL question

Re: simple SQL question

From: Nandakumar <nanban_at_my-deja.com>
Date: Wed, 04 Aug 1999 14:53:36 GMT
Message-ID: <7o9k5b$fgq$1@nnrp1.deja.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US