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: ROWNUM comparisons using < vs >

Re: ROWNUM comparisons using < vs >

From: Kenny Gump <kgump_at_mylanlabs.com>
Date: Thu, 21 Jan 1999 07:56:28 -0500
Message-ID: <36a72425.0@news.mountain.net>


rownum is not part of the table. it only counts the rows that are output. since no rows are output with the > 10 there is nothing to count.

Kenny Gump
OCP 7.3 DBA



Jim.Pickett_at_cubic.com wrote in message ...
>
>Greetings Gurus -
>
>Why is it that I can use the pseudo-column ROWNUM to get row/columns
>less than a given ROWNUM value but I can't use it to get row/columns
>greater than a given ROWNUM value ?
>
>Example from the table below has +97000 rows :
>
>
>SQL> select part_nbr from part where rownum > 10;
>no rows selected
>
>SQL> select part_nbr from part where rownum < 10;
>
>PART_NBR
>-------------------------
>#.12562GROVE
>#003005BRASS
>#006-10478
>#025DRSCR
>#51618100HSS
>#51618100SCAPSS
>#51618100SCS
>#51618100SOCHD
>#51618125H
>
>9 rows selected.
>
>SQL> select count(*) from part;
>
> COUNT(*)
>----------
> 97392
>
>======================================
> Jim Pickett
> Manager of Database Administration
> Cubic Corporation
>
> Work: (619)505-2868
> Pager: (619)494-5539
> E-mail: jim_pickett_at_cubic.com
>
> 01/20/1999 07:39:31
>======================================
>
>
Received on Thu Jan 21 1999 - 06:56:28 CST

Original text of this message

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