delete a 
where exist 

select 1 
from b 
where a.name=b.deletename ) 
这条件无法执行,为什么呢???

解决方案 »

  1.   

    delete a 
    where exists 

    select 1 
    from b 
    where a.name=b.deletename ) 
      

  2.   

    delete a
    where exists

    select 1 
    from b 
    where a.name = b.deletename
    )你的exist少一个s,应该为exists
      

  3.   

    exist  都写错了  exists 
      

  4.   

    delete a 
    where exists 

    select 1 
    from b 
    where a.name = b.deletename 
    ) 里面的子句都有问题,“where a.name=b.deletename” a.name哪里来的?
      

  5.   

    大家都发现exists被写成exist了,所以执行肯定报错。至于子查询,就要认真核查逻辑了
      

  6.   

    应该是DELETE FROM A WHERE EXISTS (SELECT 1 FROM B WHERE A.NAME = B.DELETENAME);