A表的C字段包含B表的D字段,就删除A表中的这条记录

解决方案 »

  1.   

    你的需求说的不明白
    delete from a where a.c = '123'
      

  2.   

    假设 A表有个记录其中的C字段中内容为123456789 B表中条记录有个字段D内容是123。此时删除A表中的这条记录
      

  3.   

    先判断与A表C字段对应的B有没有数据,有则不能删除,没有则删除
      

  4.   

    Delete From A
    Where C in (Select D From B)
      

  5.   

    LZ的这句‘A表的C字段包含B表的D字段’太不明确了,能说得详细点吗
      

  6.   

    LZ说:假设 A表有个记录其中的C字段中内容为123456789 B表中条记录有个字段D内容是123。此时删除A表中的这条记录
      

  7.   

    Delete From A
    Where C in (Select D From B)貌似如上
      

  8.   

    DELETE A
    FROM A
    INNER JOIN B
    ON CHARINDEX(B.D, A.C) = 1
    没测试 楼主试下
      

  9.   

    奇怪的应用...
    Delete From A
    Where C in (Select A.C From A, B Where A.C Like '%' + B.D + '%')
      

  10.   

    delect a from inner join b on a.c like '%'+b.d+'%'
      

  11.   

    delect a from a inner join b on a.c like '%'+b.d+'%'
      

  12.   

    delete from a where c in (select b.d form a,b where a.c like  '%' + b.d + '%')