create PRocedure sp_GetCurentPage (@pagesize int, --页面的大小@pageindex int) --当然的页号asbegin with temptbl as (SELECT ROW_NUMBER() OVER (ORDER BY address desc)AS Row, * from test ) SELECT * FROM temptbl where Row between (@pageindex-1)*@pagesize+1 and (@pageindex-1)*@pagesize+@pagesizeend