我如何 select 另一个 select 查询结果的第 10、20、30 ...行

How can I select 10th, 20th, 30th ... row of the result of another select query

我有一个包含 tofromID 列的 table。我只需要 select 每 10 个 ID 的行,从 AB

select * from 
(select * from table where from = 'A' and to ='B' order by ID)
where mod(rownum/10,1) = 0

先只取'A'到'B',然后给他们rownums,只取第10-20个ETC..

或者您可以直接使用

select from, to, id 
from table1 
where id like'%0' and from ='A' and to = 'B'