解决方案 »

  1.   

    update a set a.total=a.total+
    (select isnull(sum(b.total),0)
    from b where a.kind=b.kind
    group by kind)
      

  2.   


    -- 试一下这个,未测试。
    update a 
    set a.total=a.total+ (select sum(b.total) from b where a.kind=b.kind and b.total is not null)
    where exists(select * from b where a.kind = b.kind and b.total is not null )
      

  3.   

    update a set total=total+
                        (select isnull(sum(cishu),0)
                        from b where kind=a.kind
                        group by kind)