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: Limiting return of TUPLES...

Re: Limiting return of TUPLES...

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Thu, 29 Oct 1998 18:09:56 GMT
Message-ID: <3638af26.18235981@dcsun4.us.oracle.com>


On 29 Oct 1998 15:32:02 GMT, ciesnik_at_ucsub.Colorado.EDU (David Ciesnik) wrote:

>
>I appologize if this isn't the right place to ask this question.
>Say I have a table called USERS in an oracle db. Let's say that this
>table has 500 tuples/rows, containing user_id and user_name. So when I do
>a sql query, "SELECT * FROM USERS", I get all 500 rows returned. How do I
>form my sql statement so that only, say 100, or 75 rows are returned?
>
>I don't want to put in a WHERE clause that would limit return of rows
>based on column criteria. I just want the first 100 rows returned from
>the general sql statement "SELECT * FROM USERS". Thanks for any input!
> -Dave
>

select *
  from users
 where rownum <= 100

Hope this helps.

chris.

>-
>David Ciesnik . ciesnik*@*ucsub.colorado.edu
Received on Thu Oct 29 1998 - 12:09:56 CST

Original text of this message

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