SQL--分页查询
SELECT *
FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY EmployeeID DESC ) AS Rownumber ,
*
FROM HumanResources.Employee
) AS t
WHERE t.Rownumber BETWEEN ((currentPage - 1) * pageSize + 1) AND currentPage * pageSize
每天学一点,每天积累一天,进步就不止一点点!PS:好记性不如烂笔头,学会总结,学会思考~~~
----要飞翔,必须靠自己!