简单分页查询SQL语句

思路:越过多少条 取多少条

例子
select top(5) * from city where cityID not in (select top((2-1)*5) cityID from city order by cityID desc) order by cityID desc
// 每页查询5条 在城市列表 条件是 id不在 (当前页-1)*每页条数 内的 按照id 逆序排列
posted @ 2016-10-13 11:05  51nb  阅读(346)  评论(0编辑  收藏  举报