Oracle的ROWNUM伪列是实现结果集分页的关键,这里假设每页显示十条记录,取第二页,脚本如下:
1 select row_.* 2 from (select row__.*, rownum as rn 3 from (select u.userguid, u.name from userprofile u) row__ 4 where rownum <= 20) row_ 5 where row_.rn > 10;
Oracle的ROWNUM伪列是实现结果集分页的关键,这里假设每页显示十条记录,取第二页,脚本如下:
1 select row_.* 2 from (select row__.*, rownum as rn 3 from (select u.userguid, u.name from userprofile u) row__ 4 where rownum <= 20) row_ 5 where row_.rn > 10;