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: limiting rows returned ?

Re: limiting rows returned ?

From: Jeffrey M Hunter <jhunter_at_llnl.gov>
Date: 1997/04/16
Message-ID: <33551495.396A@llnl.gov>#1/1

Gopal wrote:
>
> Hi Folks,
>
> We are using Oracle 7.3.x on Win/Nt 3.51.
>
> I am new to Oracle and I have a question about limiting the rows
> being returned by a select statement.
>
> In MS SQL Server or Sybase you can say
> set rowcount 1
> select * from ...
>
> and only one row will be returned.
>
> Is there a similar option in Oracle which can be used in SQL plus and
> stored procedure ?.
>
> Regards
>
> Gopal
>
> please email to gopal_at_astro.ocis.temple.edu

I hope this is what you were after...

select * from table where rownum = 1;  


       ,-~~-.___.                           Jeffrey Hunter
      / |  '     \                Computer Scientist/Math Programmer
     (  )         0                   *           *            *
      \_/-, ,----'              Lawrence Livermore National Laboratory
         ====           //     P.O. Box 808,  L-435 Livermore, CA 94551
        /  \-'~;    /~~~(O)           *           *            *
       /  __/~|   /       |            EMAIL: jhunter_at_llnl.gov
     =(  _____| (_________|            PHONE: (510) 423-0271
-----------------------------------------------------------------------
Received on Wed Apr 16 1997 - 00:00:00 CDT

Original text of this message

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