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 -> How to select a range of records by rownum?

How to select a range of records by rownum?

From: Pao Wan <paowan_at_drdun.com>
Date: 1997/03/24
Message-ID: <5h5ol8$c9v$1@news.hkol.com>#1/1

I want to select records from 40 to 100, and I think the statement

"select rownum, user, email from clients where rownum >= 40 and rownum <=100"

will work. But it failed, I tried

"select rownum, user, email from clients where rownum <= 100"

it work. But

"select rownum, user, email from clients where rownum >= 40" failed, can
anybody help me.

Below is the result of the query
"select rownum, user, email from clients where rownum <= 100", just for your
reference.

SQL> select rownum, username, email from clients where rownum <= 100;

   ROWNUM USERNAME                              Email
--------- ------------------------------        -------------------
        1 SYS                                   sys_at_hul.com.hk
        2 SYSTEM                                master_at_hul.com.hk
        .
        .               
        .
        .
       99 Peter                                 peter_at_hotmail.com
      100 Mulder                                mulder_at_xfile.com
Received on Mon Mar 24 1997 - 00:00:00 CST

Original text of this message

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