string sql = "(select * from CorporationMainTable2 order by rowid) ta";
sql = "(select rownum rn , ta.* from " + s + " where rownum<" + (end + 1) + ")";
sql = "select * from " + s + " where rn >= " + begin;
select *
from (select rownum rn, ta.*
from (select *
from CorporationMainTable
where *
order by CreditID desc) ta
where rownum <= 4)
where rn > 0
本文介绍了一种使用SQL进行分页查询的方法,通过构造复杂的SQL语句实现对数据的高效检索,特别关注了如何利用ROWNUM及子查询来实现特定范围的数据获取。
31万+

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



