用下面的试试
delete from A where exists (select * from B where B.Id=A.Id)意思差不多,语法自己去调整吧!:)

解决方案 »

  1.   

    这个语句是用迪卡尔积,确实比较慢!如果A有100条记录,B有100条记录,实际上扫描就是100*100=10000次。
    用IN语句再试试,我能帮你的就这么多!
      

  2.   

    delete from A where id in (select id from A,B where A.id=B.id);
      

  3.   

    Exists 子句比 In 子句快的多!