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

Home -> Community -> Usenet -> c.d.o.server -> Re: Last n rows from a table

Re: Last n rows from a table

From: Steve Long <steven.long_at_erols.com>
Date: Thu, 2 Nov 2000 17:24:46 -0500
Message-ID: <8tspco$3s3$1@bob.news.rcn.net>

you need to be a little more specific in defining the specific set of rows you want. the order in which rows are returned from a table is random. "the last twenty rows" across mutliple queries may not be the same twenty rows each time. is this result acceptable, or is there some other criteria to apply to which twenty rows you get back?

if it is acceptable to get any 20 rows, which will happen without any other criteria applied than count(*) > 20, just take the first 20 rows.

i suspect there is more to your query than you have indicated.

how about clarifying the specific needs.

"Milos Wikarski" <mwikarski_at_charmed.sk> wrote in message news:973158516.123920_at_virtual.nextra.sk...
> How?
>
> I am newbie in Oracle, so that i'd like to also know effective way how to:
>
> - get number of rows which an select produces
> - fetch specified limit of rows without need to fetch unneeded rows
>
> Can someone help me?
>
> "Steve Long" <steven.long_at_erols.com> wrote in message
> news:8tr8f6$9jj$1_at_bob.news.rcn.net...
> > yes, it is possible.
> >
> > <sashid99_at_my-deja.com> wrote in message
 news:8tr3ma$f8p$1_at_nnrp1.deja.com...
> > > I'd like to retrieve the last 20 rows from a
> > > table, if the table has more than 20 rows.
> > >
> > > Is that possible?
> > >
> > > Thanks in Advance.
> > > Sashi
> > >
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> >
> >
>
>
Received on Thu Nov 02 2000 - 16:24:46 CST

Original text of this message

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