select top PageSize * from 表
where 条件 and id not in
(select top PageSize*(CurrentPageIndex-1) id from 表 where 条件 order by 排序条件)
order by 排序条件
《PageSize 是GridView中每页显示的信息条数,PageSize*(CurrentPageIndex-1) 在SQL中不识别,需定义变量来替换》
select top PageSize * from 表
where 条件 and id not in
(select top PageSize*(CurrentPageIndex-1) id from 表 where 条件 order by 排序条件)
order by 排序条件
《PageSize 是GridView中每页显示的信息条数,PageSize*(CurrentPageIndex-1) 在SQL中不识别,需定义变量来替换》