Re: How to get the first four rows???

From: Rick Rutt <rrutt_at_delphi.com>
Date: 1996/06/12
Message-ID: <ZDPM7H2.rrutt_at_delphi.com>#1/1


David P <davidp3_at_soho.ios.com> writes:  

>On 4 Jun 1996 19:24:18 GMT, austin_at_inmind.com (Michael E. Austin)
>wrote:
>
>>If you were using something like OracleRDB, you could say:
>>
>>select * from tablename where ... limit to 4 rows;
>>
>>:)
>>--
>Sorry, but there is no such thing as "LIMIT to N rows" in Oracle
 

Isn't this what the pseudo-column ROWNUM is for:  

  select * from tablename where ... AND (ROWNUM <= 4);  

Read the SQL documentation about ROWNUM for details and caveats.  

  • Rick --

(Rick Rutt is a system architect living and working in Midland, Michigan.) Received on Wed Jun 12 1996 - 00:00:00 CEST

Original text of this message