时间:2021-07-01 10:21:17 帮助过:37人阅读
declare @pagenum int = 1;declare @pagesize int = 3;WITH Tmp AS (SELECTROW_NUMBER() OVER (ORDER BY uid ASC) AS colnum,uid,unameFROM dbo.users o1)SELECT uid,uname FROM TmpWHERE colnum(@pagenum-1)*@pagesize AND colnum=@pagenum*@pagesize;
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; ,香港空间,香港虚拟主机,虚拟主机