update table1 set 小计=小计+table2.小计 from table1,table2 where table1.编号=table2.编号

解决方案 »

  1.   

    直接写 table1.编号=table2.编号
     好象不行吧  用个参数或者变量试试
      

  2.   

    update table1 set A.小计=A.小计+B.小计 from table1 A,table2 B where A.编号=B.编号
      

  3.   

    update A set A.小计=A.小计+B.小计 from table1 A,table2 B where A.编号=B.编号
      

  4.   

    写成这样
    update table1 set 小计=小计+table2.小计 from table2 where table1.编号=table2.编号
    试试