分页, rn表示行,count(*)over() 表示select count(*) 总数量 ,举例
select * from (
select t.*,rownum rn from (
select distinct file_id,file_name,upload_user,upload_time,status,message,file_type
,count(*) over () total
本文介绍了一种使用SQL进行分页查询的方法,通过使用ROWNUM和OVER()窗口函数实现对数据的高效分页显示。此方法适用于需要展示大量数据并进行快速翻页的应用场景。
分页, rn表示行,count(*)over() 表示select count(*) 总数量 ,举例
select * from (
select t.*,rownum rn from (
select distinct file_id,file_name,upload_user,upload_time,status,message,file_type
,count(*) over () total
6140
8779
1万+

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