SQLServer2005+分页SQL

declare @pagenum int = 1;
declare @pagesize int = 3;
WITH Tmp AS
(
SELECT ROW_NUMBER() OVER (ORDER BY uid ASC) AS colnum,
uid,
uname
FROM dbo.users o1
)
SELECT uid,uname FROM Tmp
WHERE colnum>(@pagenum-1)*@pagesize
AND colnum<=@pagenum*@pagesize;
上一篇:React Native at first sight


下一篇:虚拟机栈相关面试题