首页 > 代码库 > SQL Server分页语句ROW_NUMBER,读取第4页数据,每页10条

SQL Server分页语句ROW_NUMBER,读取第4页数据,每页10条

SQL Server分页语句ROW_NUMBER,读取第4页数据,每页10条

SELECT Id,[Title],[Content],[Image]
FROM (
SELECT ROW_NUMBER() OVER(ORDER BY [Id] DESC) AS ROW_NUM,Id,[Title],[Content],[Image] FROM [NewsInfo]
)AS TEMP
WHERE TEMP.ROW_NUM BETWEEN 31 AND 40

 

SQL Server分页语句ROW_NUMBER,读取第4页数据,每页10条