在oracle优化的文章里建议用exists替代in至于第一个,没用过。搬板凳学习

解决方案 »

  1.   

    楼上说的第一句我赞同,我是从事SQL SERVER的,至于第1个是ORACLE的用法,我想知道什么情况下会用到!
      

  2.   

    我在google搜了搜,又翻了oracle的联机文档,怎么都没找到some这个dd?
      

  3.   

    ALL
     Compares a value to each value in a list or returned by a subquery and yields TRUE if all of the individual comparisons yield TRUE.
     
    ANY, SOME
     Compares a value to each value in a list or returned by a subquery and yields TRUE if any of the individual comparisons yields TRUE.
     
    EXISTS
     Returns TRUE if a subquery returns at least one row.
     
    IN
     Tests for set membership.
     
    上面是官方的解释,区别应该不大,具体看执行计划吧