常用关系数据库分页SQL都是不相同的,不过大同小异
下面是Oracle分页简单事例图片以及代码:
1、普通查询:
select * from table_Name t order by active_count desc;
2、查询第一条记录:
select *
from (select * from table_Name order by active_count desc)
where rownum = 1;
3、查询前3条:类似Sqlserver中的TOP 3
select *
from (select * from table_Name order by active_count desc)
where rownum <= 3;
<