首页 > 数据库技术 > 详细

SQLServer 存储过程

时间:2017-06-18 19:46:42      阅读:275      评论:0      收藏:0      [点我收藏+]
craete proc GetPage(
     @pageIndex int,
     @pageSize int,
     @pageCount int output,
     @RecordCount int output        
)
as
begin
     set @RecordCount= select count(*) form emp
     set @pageCount =celling((@RecordCount*0.1)/@pageSize)
     select * from ( select *, row_number over(order by id) as rows) as t
     where rows between (@pageIndex-1)*@pageSize and pageIndex*pageSize
end

  

SQLServer 存储过程

原文:http://www.cnblogs.com/WJ--NET/p/7045017.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!