试一下:
delete a
from db_b a,dba_b 
where a.a_id=b.b_id and b.fld_c='x'

解决方案 »

  1.   

    delete from db_b join (select a_id from db_a where fld_c='x') b on db_b.b_id=b.a_id
      

  2.   

    delete a
    from db_b  a,dba_b  b
    where a.a_id=b.b_id and b.fld_c='x'
      

  3.   

    delete from db_b where b_id in (select a_id from db_a where fld_c='x')
      

  4.   

    delete from db_b where b_id in (select a_id from db_a where fld_c='x')
      

  5.   


    delete a from db_b a join(select a_id from db_a where fld_c='x') b on a.b_id=b.a_id
      

  6.   

    --或者:delete db_b
    from db_b b 
    where exists(
        select 1 from(select a_id from db_a where fld_c='x')a 
        where b.b_id=a.a_id)
      

  7.   

    上面的语句都是基于不改变与查询结果集关联这个慨念来做的.如果直接分析你的删除语句进行修改,就可以用:delete db_b
    from db_b b join db_a a join a.a_id=b.b_id
    where a.fld_c='x'
      

  8.   

    delete a from db_b a join (select a_id from db_a where fld_c='x') b on a.b_id=b.a_id