日期:2014-05-17 浏览次数:20988 次
select sum(t1.sales) from Store_information t1,Geography t2 where t1.store_name = t2.store_name;
------解决方案--------------------
select sum(t1.sales) from Store_information t1
where t1.store_name
IN (Select Store_name from Geography t2 ,Store_information t1 where t2.store_name = t1.store_name)
------解决方案--------------------
LZ贴下错误吧,表示没看出来错误在哪。
select sum(t.operid) from operskill t
where t.skillid in (
select skillid from skillinfo t1 where t.skillid =t1.skillid
);
------解决方案--------------------
--別用in,效率低
select sum(t1.sales) from Store_information t1
where exists (Select 1 from Geography t2 where t2.store_name = t1.store_name);