简单查询语句,还请高手们出手啊:) Select A.id,SUM(A.count+IsNull(B.count,0)) As countfrom A Left Join BOn A.id=B.idGroup By A.id 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select id,sum(count) from(select * from Aunion allselect * from B)T select m.id,sum(m.count)from (select * from A union all select * from B) m ---倒,错了select id,sum(count) from(select * from Aunion allselect * from B)Tgroup by id --雷卡安在?--I am here. Hi~~~~ left join 有问题的,表a并非包含所有的id 游标的使用,请高手指点一下! sql 2005 卸载后,无法安装msde 2000 询问一个向SQL表里插入大量整数值的问题 安装SQL SERVER SP4时报程序读注册表项时失败,急!!!! SQLServer和Informix数据库间Datetime型的转换问题!急 数据库高手请进! 新手请教select where命令 怎样复制表的结构 (sql server7) SQL Server 中数据导入导出 怎样在不改变或删除SQL6.5的已有数据库的情况下更改默认的语言为简体中文版? 怎样知道一个数中有3个(或大于3)连续相同数字的问题 各位,救命啊!!
(select * from A
union all
select * from B)T
from (select * from A union all select * from B) m
select id,sum(count) from
(select * from A
union all
select * from B)T
group by id
--I am here. Hi~~~~