SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER BY Id ASC) AS rowid,* FROM UserInfo)t WHERE t.rowid > @min AND t.rowid <= max
pageIndex当前页数
pageSize每页几个
@min=(pageIndex-1)*pageSize
@max=pageIndex*pageSize