数据库分页

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

 

posted on 2016-03-07 11:25  荧明  阅读(165)  评论(0编辑  收藏  举报

导航