sqlserver2000数据库分页查询[根据网上搜索到得sql修改]

sqlserver2000分页查询[根据网上搜索到得sql修改]

 

select top 页大小 *

from testtable

where (id >

(select case when count(0) < 页大小 then 0 else max(id) end

from (select top 页大小*(页数-1) id

from 表

order by id) as t))

order by id

 

(0)
上一篇 2022年3月21日
下一篇 2022年3月21日

相关推荐