直接用
select id from (select id,rownum con from testsort order by id) where con>=M and con<=N;
select id from (select id,rownum con from testsort order by id) where con>=M and con<=N;
解决方案 »
- 求教!oracle 问题 。刚安装的oracle 在创建 数据库最后一步提示tns 协议适配器错误.
- ORACLE 10
- 求一个存储过程示例
- 查询时,怎么样把相同记录去除
- 这样让某一个存储过程在N个时间区段执行可行否?
- Oracle92httpserver 服务启动不了怎么办??
- 哪位大哥有ORACLE的入门学习资料最好是中文版的
- 初始安装好Oracle8i后,为什么登陆不上Oracle的sql-plus操作呢?快来救我啊!!!
- 高手请问: 在过程中如何实现 rollback 和提交
- 存储过程如何将update中多条语句其中两字段返回到指定游标中,求职大佬们
- 不能进入SQL PLUS
- 不同用户之间的数据倒换
的方法是不行的,而且要结合用户的查询条件,大家还是自己实际测试一下
8i以上(含8i)8i以下
select id from (select id,rownum con from (select id from testsort where ... group by id))
where con>=M and con<=N;
如果是要取中間幾條記錄的話,ORARichard(没钱的日子......) 的方法是正解
(select id, rownum roworder
from TestSort where rownum < 20 order by id
)
where roworder > 2;要先 rownum < 20
http://dev.csdn.net/develop/article/21/21371.shtm