首页 > 技术文章 > Oracle 完美解决子查询中不能使用order by 方法

smartisn 原文

发现 from后面是可以跟order by 的所以只用 把 from 表名 换成 from( select b.pubdata from policy b order by b.pubdata ) 就可以了,样例代码:

1 select * from policy where rowid not in(select rowid from 
( select *from policy b order by b.pubdata ) where rownum<=0 ) and rownum<=1;

推荐阅读