Re: Help - SQL Syntax
From: Luis Cabral <cabral_at_merconet.com.br>
Date: 1997/12/10
Message-ID: <01bd054e$76596540$LocalHost_at_netuno>#1/1
Date: 1997/12/10
Message-ID: <01bd054e$76596540$LocalHost_at_netuno>#1/1
Hi,
There is a pseudo-column called rownum, that starts with 1 and is incremented by 1 for each row retrieved. Among its many uses, you can write, for example:
select column1, column2
from tablea
where column1 = 'value' and
rownum <= 10;
to retrieve only the first ten rows.
See, if you put:
where rownum > 10
or rownum = 5
or anything like that, it will never return any rows.
I hope it helps.
-- Luis Cabral (Brasil) cabral_at_merconet.com.br Dwight Seeley <dseeley_at_primenet.com> escreveu no artigo <348C9E93.E028DE38_at_primenet.com>...Received on Wed Dec 10 1997 - 00:00:00 CET
> Does anyone know how to construct an SQL query such that the result set
> is never more than the first ten (10) rows? The result set could be
> less than ten (10), but, never more than ten (10). This must be
> accomplished in one (1) SQL statement.
>
> Please respond to email - dseeley_at_primenet.com
>
> Thank You,
> D. Seeley
>
>
