DECLARE @page INT, @size INT;
select @page = 300, @size = 10
SELECT *
FROM gpcomp1.GPCUST
WHERE company like ‘a%‘
ORDER BY CUSTNO
OFFSET (@page -1) * @size ROWS
FETCH NEXT @size ROWS ONLY;
SQL Server 2012 新的分页函数 OFFSET & FETCH NEXT,布布扣,bubuko.com
时间: 2024-10-10 17:07:05