ORACLE 分页SQL
程序员文章站
2022-03-16 17:16:52
...
1、使用rowid、rownum位列分页 select * from table1 where rowid in ( select rid from ( select rid,rownum rn from ( select rowid rid from table1 order by fid desc ) where rownum4 ) where rn=1 ) order by fid; 2、使用rownum伪列进行分页 select *
1、使用rowid、rownum位列分页
select * from table1 where rowid in (select rid from (select rid,rownum rn from (select rowid rid from table1 order by fid desc) where rownum) where rn>=1) order by fid;
2、使用rownum伪列进行分页
select * from (select t1.*,rownum rn from (select * from table1 order by fid) t1 where rownum=1 order by fid
上一篇: php文件包含目录配置open_basedir的使用与性能分析
下一篇: PHP内置加密函数