SQLServer中左联接查询用left joi

12 查阅
SQLServer中左联接查询用left join,Oracle中用什么?

参考答案:

正确答案:

\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(+)
自连接:select(nvl(a.c,0)-nvl(b.c,0)) from a,b where a.id(+)=b.id(+)
说明:加号写在左就是左连接,写在右就是右连接,