有A、B两表,已知表A中a字段的值。要求利用已知表A中a字段的值,删除表B中等于表Aa字段所在的列中b字段值的数据。

解决方案 »

  1.   

    update b
    set b=''
    from 
    a
    join
    b on a.ID=b.aid
      

  2.   


    delete b from b where b in (select a from a)
      

  3.   

    delete from B
    where exists(select * from A where a.a=b.b)
      

  4.   

    --1
    delete b from b where b in (select a from a)--2
    delete b from b , a where b.b = a.a
      

  5.   

    delete b from b , a where b.b = a.a
      

  6.   

    有A、B两表,已知表A中a字段的值。要求利用已知表A中a字段的值,删除表B中等于表Aa字段所在的列中b字段值的数据。 delete a from A a join B b on a.a=b.b
      

  7.   


    delete b from b join a on b.a=a.a 
      

  8.   

    delete b from b where b in (select a from a)
      

  9.   

    delete  from B left join A on B.a=A.a