SQLServer中左联接查询用left joi
12 查阅
参考答案:
左连接:select(nvl(a.c,0)-nvl(b.c,0)) from a,b where a.id(+)=b.id
\r\n
右连接: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(+)
说明:加号写在左就是左连接,写在右就是右连接,