OK, bzszp(SongZip) is right,but maybe u should pay attension to some special situation. that is, u should use "order by" or create index for the table.
select rownum id,table_name.* from talbe_name where id<11; ================== select * from talbe_name where rownum <21 minus select * from table_name where rownum <10
The first one is no problem. The second is just like what google_real said. but you can try this one, it is more straightforward:select * from tbname where rownum<21 minus select * from tbname where rownum<11;
as to the second one from bzszp(SongZip), i think there is some more work to do to get a better efficiency: select * from (select rownum id,tbname.* from tbname where rownum < 21) where id>10; Note : index or "order by" is required.
special situation. that is, u should use "order by" or create index
for the table.
from talbe_name
where id<11;
==================
select * from talbe_name where rownum <21
minus
select * from table_name where rownum <10
minus
select * from tbname where rownum<11;
more work to do to get a better efficiency: select * from (select rownum id,tbname.* from tbname
where rownum < 21) where id>10; Note : index or "order by" is required.