時間:2024-03-04 00:33作者:下載吧人氣:19
在Sql Server 2012之前,實現分頁主要是使用ROW_NUMBER(),在SQL Server2012,可以使用Offset …Rows Fetch Next … Rows only的方式去實現分頁數據查詢。
select [column1]
,[column2]
…
,[columnN]
from [tableName]
order by [columnM]
offset (pageIndex-1)*pageSize rows
fetch next pageSize rows only
網友評論