sql server的简单分页

--显示前条数据

select top(4) * from students;

 

--pageSize:每页显示的条数

--pageNow:当前页

 

select top(pageSize) * from students where sno not in (select top(pageSize*(pageNow-1)) sno from students);

 

--带条件的分页

select top (pageSize) * from students

where sno not in

(select top(pageSize*(pageNow-1)) sno

from students where ssex='') and ssex='';

 与Oracle的分页有些大同小异,就不一一介绍了Oracle分页连接https://www.cnblogs.com/yijieyufu/p/11148739.html

posted @ 2019-12-04 22:09  Aquiet  阅读(...)  评论(...编辑  收藏