Re: Selecting only the first row from a query

From: Pavana Kuchana <ibss_at_ix.netcom.com>
Date: 1995/12/02
Message-ID: <49o4ua$c2b_at_ixnews4.ix.netcom.com>#1/1


In <49ig0o$4q0_at_ams.amsinc.com> joel_nylund_at_mail.amsinc.com (Joel Nylund) writes:
>
>
>
>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 with 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

hi joel

i hope u can do .
write the select criteria
and then say rownum <2;
then u will get the first row of u'r query on to a table. bye know
good luck Received on Sat Dec 02 1995 - 00:00:00 CET

Original text of this message