Re: Simple SQL question.
From: Evan J. Greene <ejg_at_sequent.com>
Date: Mon, 28 Jun 93 16:05:53 GMT
Message-ID: <1993Jun28.160553.18327_at_sequent.com>
Date: Mon, 28 Jun 93 16:05:53 GMT
Message-ID: <1993Jun28.160553.18327_at_sequent.com>
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
+====================================================================+
| +-----+ From: Evan J. Greene, Sequent Computer Systems |
| | #| Professional Services Group, Boston |
| | | Email: ejg_at_sequent.com |
| +-----+ Address: 25 Burlington Mall Road, Burlington, MA 01803 |
| Phone: 617-229-8881 FAX: 617-229-4894 |
+====================================================================+
Received on Mon Jun 28 1993 - 18:05:53 CEST
