select id,a from (select rownum id,a from tb1 where rownum<200) where id > 10;
试试这个: select rownum+10,a from tbl where a not in (select a from tbl where rownum<11) and rownum<200
准确的写法 select X.* from (select rownum row_num,A.* from tab1 A ) X where X.row_num>10 and X.row_num<200
楼上的方法效率不高,如果表很大,单这句select rownum row_num,A.* from tab1 A 子查询就很耗资源。
select a from tb1 where rownum<200 minus select a from tb1 where rownum<10
这有两种方法: 1:Select A.* from Tabl A where Rownum<201 minus Select A.* from Tabl A where Rownum<11; 2.select X.* from (select rownum row_num,A.* from tab1 A row_num<201) X where X.row_num>10 请大家评价它们的性能。
比较赞同: Select A.* from Tabl A where Rownum<201 minus Select A.* from Tabl A where Rownum<11;
where id > 10;
select rownum+10,a from tbl where a not in (select a from tbl
where rownum<11) and rownum<200
select X.* from
(select rownum row_num,A.* from tab1 A ) X where X.row_num>10 and
X.row_num<200
minus
select a from tb1 where rownum<10
1:Select A.* from Tabl A where Rownum<201 minus
Select A.* from Tabl A where Rownum<11;
2.select X.* from
(select rownum row_num,A.*
from tab1 A row_num<201) X
where X.row_num>10
请大家评价它们的性能。
Select A.* from Tabl A where Rownum<201 minus
Select A.* from Tabl A where Rownum<11;