Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL selecting records
Once again, caution is in order - The query listed will return 5 rows, but not,
in any real sense, the FIRST 5 rows..since in a RDBMS the concept first is
undefined...
If all you want is any 5 rows, this query is fine...
"Happy" <allan_at_livvy80.freeserve.co.uk> wrote:
>SELECT *
>FROM table_name
>WHERE column = criteria
>AND rownum < 6;
>
>should return first five rows
>
>Cheers
>Allan
>
>"Alan" <alwong_at_123infosys.com> wrote in message
>news:lNYh6.1859$Vp.200052_at_newsread2.prod.itd.earthlink.net...
>> I am trying to only get the first 5 records out of tables that met certain
>> criteria. Can I get these 5 records without getting all the records that
>> met certain criteria? Thanks.
>>
>>
>>
>
Received on Tue Feb 13 2001 - 12:37:15 CST