日期:2014-05-16  浏览次数:20459 次

oralce 高效数据库分页

select *

from

? (select *

? from

? ? (select t.*,

? ? ? row_number() OVER(ORDER BY null) AS "row_number"

? ? from bayonet_vehiclepass t

? ? ) p

? where p."row_number" > 0

? ) q

where rownum <= 20

?

bayonet_vehiclepass ?表名

"row_number" > 0 ? ? ?0为分页的初始值

rownum <= 20 ? ? ? ? ? ?20为页大小