Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Filtered Query on nth row
On Thu, 05 Feb 1998 19:29:08 -0500, Jeff Jackson <jeff_at_tatca.tc.faa.gov> wrote:
Use rownum like this...
select id
from (select rownum s, s_emp.* from s_emp)
where mod(s,5) = 1;
result---
id
good luck...
ksjune_at_sys.gsnu.ac.kr
>Does anyone know how to do a query and filter every nth row ? Example,
>I have 100 rows returned but I am only intereseted in every other fith
>row for example.... row1, row6, row11,row16 etc.... I don't want to see
>rows 2,3,4,5,7,8,9,10 etc ... Is this possible ?
>
>Does SQL allow me to do this ? I have tried all kinds of queries,
>correlated, inner joins, sub queries and various expressions.
Received on Tue Feb 10 1998 - 00:00:00 CST
![]() |
![]() |