欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

oracle SQL分页代码

程序员文章站 2022-05-24 10:08:30
...

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

/*+ 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 where rn >= :3) t1, test t2
where t1.rid = t2.rowid