---
title: "oracle 分页函数"
author: "bbsanwei"
date: "2016-07-30T09:15:45Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2016-09-08T16:33:46Z"
id: 2314381
url: "https://bbsanwei.iteye.com/blog/2314381"
---

select row_.* from (select t.*,row_number() over (order by t.id) as num from t_person_info t 
 left join t_person_info d on t.id = d.id) row_  where num<= 500  and  num> 400


 SELECT * FROM (SELECT ROWNUM AS rowno, t.*
        FROM t_person_info  t
        WHERE rownum <=500) table_alias
        WHERE table_alias.rowno >= 400