select *
from (select t1.hr_no,
t1.hr_date,
(row_number() over(order by t1.hr_date desc)) mm
from T_HR t1) t2
where mm <= 5
from (select t1.hr_no,
t1.hr_date,
(row_number() over(order by t1.hr_date desc)) mm
from T_HR t1) t2
where mm <= 5
本文介绍了一种使用 SQL 的 Row_Number 函数进行高效分页查询的方法,通过具体实例展示了如何实现最近日期的前五条记录的快速检索。
4431
2618

被折叠的 条评论
为什么被折叠?