本帖最后由 phpcainiao 于 2012-10-18 16:43:58 编辑

解决方案 »

  1.   

    update ax1 a inner join (select xxid,count(*) as js from ax2 group by xxid) b
    on a.xxid=b.xxid
    set a.tongji=b.js
      

  2.   

    update ax1 A,(select xxid,count(*) as num from ax2 group by xxid) B
    set A.tongji=B.num
    where A.xxid=B.xxid
      

  3.   

    update ax1,(select xxid,sum(length(neirong)) as c from ax2 group by xxid) b
    set ax1.tongji=b.c
    where ax1.xxid=b.xxid
      

  4.   

    或者update ax1 inner join (select xxid,sum(length(neirong)) as c from ax2 group by xxid) b
    on ax1.xxid=b.xxid
    set ax1.tongji=b.c