怎样同时对两个结构完全一样的数据表进行查询,请高手指点!!!! Select * From Table1 Where xxxxxxxxxxxxUnion AllSelect * From Table2 Where xxxxxxxxxxxx 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from talbe1unionselect * from tagle2 我统计表中的一个字段:SL(数量)语句是:selelct sum(sl) from table1unionselect sum(sl) from table2统计出来的结果和我两个表分别统计出来的结果加起来的结果不一样啊 Select sum(sl) from (selelct sum(sl) as sl from table1unionselect sum(sl) as sl from table2) as T select sum(s1) from (selelct sl from table1unionselect sl from table2 ) a select sum(s1) from (selelct sl from table1union allselect sl from table2 ) a stone_lin(石),太感谢你了,我刚才试过,对了 。感谢各为兄弟!!!!!!!! 实在被这个经度纬度搞晕了,哪么大虾指点一下 sqlserver compact版,除了在C#的IDE里访问,能用命令行或者其他的管理工具来访问么? 怎样在同一行显示最大值和最小值? 求一个插入语句 我的数据库中文显示都是乱码,怎么办? 分组求最小值 SQL正在挂起更改 救我!谁知道,SQL语言中的Insert和Delete语法规 关于异地数据库同步问题! =========如何协调两台单机中的数据库的数据更新??????======== 在不同的数据库中查询字符型字段相等的数据。 数据记录集的一个问题,是不是我搞错了?
union
select * from tagle2
selelct sum(sl) from table1
union
select sum(sl) from table2
统计出来的结果和我两个表分别统计出来的结果加起来的结果不一样啊
union
select sum(sl) as sl from table2) as T
selelct sl from table1
union
select sl from table2 ) a
selelct sl from table1
union all
select sl from table2 ) a