select * from (
select rownum id, a.* from
(select table_a.* from table_a group by column_a ) a where rownum<20)
where id>=10;
select rownum id, a.* from
(select table_a.* from table_a group by column_a ) a where rownum<20)
where id>=10;
解决方案 »
- oracle11g+win7:ORA-12154: TNS:could not resolve the connect identifier specified
- rman远程备份问题!
- 一个很奇怪的sql,我没搞懂
- 如何计算两个时间相差多少秒?
- 哪位大虾能帮我!装了ORACLE9!客户端,但连网上的ORACLE时,它总是提示没有监听器!!为什么?
- 用toad倒入*.VW文件不成功?
- 哪里有在linux下面安装oracle的文档?十分感谢
- 各位大侠看看我这个删除怎么不可以?
- oracle的奇怪的问题:ORA-01033: ORACLE initialization or shutdown in progress
- 表空间与数据文件是一个什么样的关系?
- 动态游标可以带参数吗?
- oracle建表和查询问题
SQL> select ename
2 from (select ename , row_number() over (order by sal) no from scott.emp)
3 where no between 11 and 20
4 /ENAME
----------
JONES
SCOTT
FORD
KING
select rownum id, a.* from
(select table_a.* from table_a group by column_a ) a where rownum<20)
where id>=10;
(select *,rownum myrow from table_a order by column_a)
where myrow between 10 and 20
但是order by中用来排序的一定得是主键才生效。用的就是zhenyukeji(何处是我家) 的方法。跟 bzszp(SongZip) 的方法比较相似吧。
而guogexp(中华牙膏) 的方法在sqlplus中可以在pl*sql中却不行,row_number()后面的order by通不过语法检查。再次谢谢大家。结题了。