现在的位置: 首页 > 综合 > 正文

sql分页语句

2013年10月21日 ⁄ 综合 ⁄ 共 386字 ⁄ 字号 评论关闭

总结分页SQL语句为:

select top pageSize userID,name,country from info where userID not in
(select top pageSize*(curPage - 1) userID from info where country='morocco' order by userID Desc)
and country='morocco' order by userID Desc

 

 

该分页查询方式必须依赖唯一键!!!

 

 

抱歉!评论已关闭.