关于SQL里的TOP 1在ORACLE中的写法在SQL里。一般要选都是第一条都是select top 1a,b from table order by c
关于SQL里的TOP 1在ORACLE中的写法 在SQL里。一般要选都是第一条都是 select top 1 a,b from table order by c. 我在 ORACLE里这样改 select * from (select a,b from table order by c) where rownum<=1 我这样写 会不会不够严谨。还望大哥们,指导下 [解决办法] where后面的语句是从右往左的执行的,还有你这条SQL可以优化下select a,b from (select a,b from table order by c) where rownum<=1 [解决办法]