一个简单问题:
假设一个表A,有ID1,DZCL字段;有一个表B,有ID2和CL字段,现在想用B的CL,替换A的DZCL,条件是A.ID1=B.ID2,这样的动作用一个SQL写出来,难住了洒家。请教

解决方案 »

  1.   

    update a set dzcl=cl from a,b where a.id1=b.id2
      

  2.   

    update set a.dzcl=b.cl from A as a, B as b where a.id1=b.id2
    这个不行吗
      

  3.   

    改一下,加个a
    update a set a.dzcl=b.cl from A as a, B as b where a.id1=b.id2
      

  4.   

    在ACCESS里,这样允许:
     update a,b set a.dzcl=b.cl  where a.id1=b.id2 但是在ORACLE里,报missing SET keyword