ORACLE:
1、查询前10行:select * from sc_objects where rownum <=10
2、利用minus
查询10到20行:select * from sc_objects where rownum <=20 minus select * from sc_objects where rownum <=10;
查询20行之后:select * from sc_objects minus select * from sc_objects where rownum <=20;
3、常用于分页查询:
PAGESIZE:每页显示的记录数
CURRENTPAGE:当前页号
数据表的名字是:components
索引主键字是:id
select * from components where id not in(select id from components where rownum<=(PAGESIZE*(CURRENTPAGE-1))) and rownum<=PAGESIZE order by id;
如下例:
select * from sc_objects where id not in(select id from sc_object