sqlserver 分页查询
DECLARE @pagesize INT= 10; --每页10条 DECLARE @page INT = 1; --第几页 SET STATISTICS TIME ON; SELECT * FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY id ASC ) AS rownumber , * FROM AppNewsBackStage ) temp_row WHERE n_appId = 2 AND rownumber BETWEEN ( @page - 1 ) * @pagesize + 1 AND @page * @pagesize