Oracle 完美解决子查询中不能使用order by 方法

发现 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;

 

posted @ 2020-12-07 18:45  博二爷  阅读(3951)  评论(0编辑  收藏  举报