oracle 排序后分页查询

 

demo:

 

select * from ( select * from DEV_REG_CFG_CAMERA where 1 = 1 order by unid asc) where rownum < 3001 minus select * from ( select * from DEV_REG_CFG_CAMERA where 1 = 1 order by unid asc) where rownum < 1

 

minus是差集的意思,、

 

以上sql的意思是,查询DEV_REG_CFG_CAMERA中以unid字段排序后,取前3000条。

posted @ 2019-08-20 23:58  护花使者  Views(839)  Comments(0Edit  收藏  举报