相当于sql 的 right out joinfrom a left outer join b where a.id=b.id
手误 from a right outer join b where a.id=b.id如果加号在右边则是left outer join
右外连接 相当于 select(nvl(a.c,0)-nvl(b.c,0)) from a right outer join b on a.id=b.id 楼上的应该是on不是 where
SQLServer中左联接查询用left join,Oracle中用什么? 左连接:select(nvl(a.c,0)-nvl(b.c,0)) from a,b where a.id(+)=b.id 右连接:select(nvl(a.c,0)-nvl(b.c,0)) from a,b where a.id=b.id(+) 自连接:select(nvl(a.c,0)-nvl(b.c,0)) from a,b where a.id(+)=b.id(+) 说明:加号写在左就是左连接,写在右就是右连接,看加号的方法来定
from a right outer join b where a.id=b.id如果加号在右边则是left outer join
相当于
select(nvl(a.c,0)-nvl(b.c,0)) from a right outer join b on a.id=b.id
楼上的应该是on不是 where
右连接:select(nvl(a.c,0)-nvl(b.c,0)) from a,b where a.id=b.id(+)
自连接:select(nvl(a.c,0)-nvl(b.c,0)) from a,b where a.id(+)=b.id(+)
说明:加号写在左就是左连接,写在右就是右连接,看加号的方法来定