Re: Simple SQL question.

From: Guest Account <guest_at_sgi.com>
Date: Mon, 28 Jun 1993 23:57:49 GMT
Message-ID: <C9CvwD.HH0_at_odin.corp.sgi.com>


In article <1993Jun28.160553.18327_at_sequent.com> ejg_at_sequent.com (Evan J. Greene) writes:
>In article <20mvj6$hi_at_samba.oit.unc.edu> chrisvh_at_med.unc.edu (Chris G. vanHasselt) writes:
>>My question has either a real simple solution or it can't be done! Is
>>there a way, without creating some sort of dummy field, to write a SQL
>>query so that instead of returning all records satisfying a where clause,
>>it returns only the first 5 records satisfying that clause.
>>
>>Is there an easy way to do this?
>>
>>
>>Please reply to chrisvh_at_med.unc.edu
>>
>>Thanks in advance
>>Chris van Hasselt
>>
>>chrisvh_at_med.unc.edu
>>
>Yes, there is a way: add "AND ROWNUM <= 5" to your WHERE clause...
>
>Evan

this wouldn't work if chris also wants to use an ORDER BY !!!!

ram Received on Tue Jun 29 1993 - 01:57:49 CEST

Original text of this message