select * from
(
select t.*,rownum row from
(
select * from table where 列名 = ' ' order by ‘index’, rowid) t
where row <=?
)
where row >=?
本文介绍了一种使用SQL进行高效分页查询的方法。通过ROWNUM和子查询结合使用,实现对大数据表的有效分页,提高了查询性能。适用于需要对数据库进行分页展示的场景。
select * from
(
select t.*,rownum row from
(
select * from table where 列名 = ' ' order by ‘index’, rowid) t
where row <=?
)
where row >=?
1612
832
608

被折叠的 条评论
为什么被折叠?