这个不需要外连接,也不是外连接的问题
select a.cphm,a.jyl,b.行驶里程
from (select cphm,sum(jyl) from table_a group by cphm) a,
table_b b
where a.cphm=b.车牌号码;
select a.cphm,a.jyl,b.行驶里程
from (select cphm,sum(jyl) from table_a group by cphm) a,
table_b b
where a.cphm=b.车牌号码;
where table1.column1=table2.column1(+)
select cphm,sum(jyl)from 表a group by cphm “+” select cphm,sum(xslc) from 表b group by cphm(其中的条件省略了)where a.cphm=b.cphm
产生这样的效果车牌号吗 加油量 行驶里程
cphm jyl xslc
1001 250 100
1002 102 200
不知能否利用外联接呢?
恕在下愚蠢!请赐教!!!
where c.cphm=b.cphm(+) and
c.cphm=a.cphm(+)
group by c.cphm