您的位置:首页 > 数据库 > Oracle

Oracle取中间记录 取前10条记录 Oracle按排序取中间记录

2009-05-18 09:52 381 查看
去前10条记录

select * from table where rownum <11

取中间记录

方法一:

select * from (select rownum id,* from table where 1=1 order by field ) where id > 11 and id < 21

方法二:

select * from (select rownum ,* from table where 1=1 and rownum<21 order by field )

minus

select * from (select rownum ,* from table where 1=1 and rownum>11 order by field )
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: