SQLServer中的两种分页写法
<br />第一种是最传统的写法,用存储过程中的变量作为分页的乘数<br /> <br />create proc p_paged1
@pageSize int,@currentPage int
as
select top (@pageSize) * from student
where id not in
(select top (@pageSize*(@currentPage-1)) id from student)
go
exec p_paged1 2,3 <br />--SQL Se
原创
2011-05-25 16:09:00 ·
952 阅读 ·
0 评论