试试:create temporary table t
select username, goodsCount from t1 where username like 'A%' union all
select username, goodsCount from t2 where username like 'A%';select username, sum(goodsCount) group by username;drop table t;

解决方案 »

  1.   

    没有更好的方法吗?mysql 就是这么的好用?
      

  2.   

    受不了了連select a.c1,b.c2 from
    ( select c1,tid from t1 where tcount >0) a,
    ( select c2,tid from t2 where tcount >0) b
    where a.tid = b.tid都不支持怎麼用呀萬人傳頌的優秀數據庫就是這個樣子的麼?太讓人失望了!
      

  3.   

    2 樓的SQL 可以在 mysql 中運行且可以得出正確結果
    但卻沒辦法通過 recordset 取得數據...可以取得麼?drop 放到前面和放到後面都試過了