oracle 的分页查询:
select * from (select o.*,rownum rn from Persons o) where rn >40 and rn <=60 ;
mySQL 的分页查询:
select o.* from Persons o limit 40,20 ; limit (偏移条数,数据条数)
SQLServer :top
select top 4 * from order by hiredate 自注: 显示第一个到第四个入职的员工
SELECT
TOP 10 *
FROM
(
SELECT
ROW_NUMBER () OVER (ORDER BY id ASC) RowNumber ,*
FROM
student
) A
WHERE
A.RowNumber > (PageNo - 1) * PageSize
原文地址:https://www.cnblogs.com/brianlai/p/10298057.html
时间: 2024-10-12 08:12:44