oracle 排序后分页查询

不羁岁月 提交于 2019-11-28 01:44:40

 

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条。

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!