加上NVL判断!
或者用 decode 来处理。update A set A.qty = (select NVL(B.qty,A.qty) from B where B.id=A.id)

解决方案 »

  1.   

    加exists判断,
    update A set A.VALUE = (
    select B.VALUE from B where A.ID=B.AID)
    where exists (select 1 from C where A.ID=C.AID)
      

  2.   

    结果结果还是一样ID  VALUE
    0      
    1     
    2   2   
    3   3   
    B表中未出现的数据被抹除掉了, 请问如何解决??
      

  3.   

    加exists判断,
    update A set A.VALUE = (
    select B.VALUE from B where A.ID=B.AID)
    where exists (select 1 from C where A.ID=C.AID)提示表或视图不存在. 加上NVL判断!
    或者用 decode 来处理。
    update A set A.qty = (select NVL(B.qty,A.qty) from B where B.id=A.id)结果结果还是一样ID  VALUE
    0      
    1     
    2   2   
    3   3   
    B表中未出现的数据被抹除掉了, 请问如何解决??
      

  4.   

    看看这个吧
    Update TableA 
       set TableA.Fvalue =(Select TableB.Fvalue  From TableB where tablea.fid = tableB.Fid)
       Where tableA.Fid in  (select tableB.Fid From TableB)
      

  5.   

    update A set A.VALUE = (
    select B.VALUE from B where A.ID=B.AID)
    where exists (select 1 from C where A.ID=C.AID)其中C表就是B表,