码迷,mamicode.com
首页 > 数据库 > 详细

数据库分页

时间:2016-03-07 11:46:31      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:

if(object_id(proc_getStudentPage,P) is not null)
    drop proc proc_getStudentPage
go
    create proc proc_getStudentPage(@startindex int,@endindex int)
as
    select count(*) from RealPZGL_D
    select * from (
        select row_number() over(order by id) as rowid ,* from RealPZGL_D 
    ) temp
where temp.rowid between @startindex and @endindex
go

 

数据库分页

标签:

原文地址:http://www.cnblogs.com/lushousong/p/5249873.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!