Oct
12
使用标准的SQL代码进行分页,通过动态合成查询语句来实现,简单易用,速度应该是不凡的。
例子:原 SQL
select
field1, field2 …
from ab c, cd e where 1=1 and
c.id = d.id
order by c.id
分页, SQL更改为
select top 30
field1, field2 …
from ab c, cd e where 1=1 and
c.id = d.id
and c.id not in (
select top 200
c.id
from ab c, cd e where 1=1 and
c.id = d.id
order by c.id
)
order by c.id
其中 200是当前记录数,30是每页显示数
Popularity: 4% [?]
相关文章
还没找到您要的东西?Google试试看吧,
Google更注重原创、时效性好的文章:
Google更注重原创、时效性好的文章:
本文到目前为止还暂无回复