select * where 姓名 in ('a','b','c')    
想用EXIST 来改写的话怎么写呢?

解决方案 »

  1.   

    忘记了 写 from 
    select * from table1 where 姓名 in ('a','b','c')    
      

  2.   

    exist 不是用在这地方的  
    select * from biao where name in (select name from biao 2 where )
    这样的才用exist 替换
      

  3.   

    我也想知道难道是这样写
    with A as (
    select 'a' as col from dual union
    select 'b' from dual union
    select 'c' from dual)
    select * from table1 where exists(select 1 from A where col=姓名 )
      

  4.   

    据说所有的 in 都可以用exists替换
    估计楼主就是由次发问的
      

  5.   

    exists 效率也不高的。 如果可以用表连接,就尽量用表连接。