Re: Selecting only the first row from a query

From: Ken Denny <kdenny_at_mail.concentric.net>
Date: 1995/12/10
Message-ID: <4adj16$9qr_at_spectator.cris.com>#1/1


joel_nylund_at_mail.amsinc.com (Joel Nylund) wrote:
>
>
>I need to write a sql statement to only return the first row that meets >the criteria. For example I have a table called people wit=
 h names and >phone numbers. There may be several "Joel Nylund's" in the table, I only >want the first one I find.
>
>in DB2, I can do a select first
>
>I am looking for something that will work in oracle and sybase.
>
>thanks in advance
>Joel

 I don't know about sybase but in oracle you can add "and rownum=1" to your "where" clause. Received on Sun Dec 10 1995 - 00:00:00 CET

Original text of this message