sqlserver的简单分页

database

--显示前条数据

select top(4) * from students;

 

--pageSize:每页显示的条数

--pageNow:当前页

 

selecttop(pageSize) *from students where sno notin (selecttop(pageSize*(pageNow-1)) sno from students);

 

--带条件的分页

selecttop (pageSize) *from students

where sno notin

(selecttop(pageSize*(pageNow-1)) sno

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

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

以上是 sqlserver的简单分页 的全部内容, 来源链接: utcz.com/z/531680.html

回到顶部