一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

oracle SQL分页代码

时间:2022-06-29 10:10:13 编辑:袖梨 来源:一聚教程网

文章提供一个简单的实现的oracle SQL分页代码 ,希望对大家有帮助。

 

select /*+ ordered use_nl(t1 t2) */ id, user_id, age, gmt_create
    from (select rid
        from (select rid, rownum as rn
            from (select rowid as rid
                from test where user_id = :1
                order by gmt_create desc)
            where rownum <= :2)
    where rn >= :3) t1, test t2
where t1.rid = t2.rowid

热门栏目