Oracle SQL:WHERE子句中(+)=的含义 [英] Oracle SQL: Meaning of (+)= in WHERE clause

查看:435
本文介绍了Oracle SQL:WHERE子句中(+)=的含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对在Oracle数据库的where子句中使用(+)=有疑问;

I have a question about the using of (+)= in the where clause in Oracle database;

  1. a. id= b.id(+)

这是否意味着左连接,即a.id = b.id,对的b上的左连接?

Does that mean a left join that a left join on b where a.id=b.id, right?

  1. a.Job_Type(+) = 'Manager'

我不明白他为什么在这里使用(+)=,而不是a.Job_Type ='Manager',他们是一样的吗?

I don't understand why he uses (+)= here, but not a.Job_Type = 'Manager', are they the same?

推荐答案

(+)标识正在外部联接的表.按照我的教导方式,(+)表示该表将缺少行,因此必须为其添加新的NULL行.

The (+) identifies the table that is being outer joined to. The way I was taught, the (+) indicated the table that would have missing rows for which new NULL rows had to be added.

如果您查看在LEFT OUTER JOIN成为ANSI标准的一部分之前,各种数据库所支持的备用左外部联接语法,则通常将专有运算符应用于缺少"行的表. DB2还以与Oracle相同的方式支持(+)运算符进行外部联接.

If you look at the alternate left outer join syntaxes that various databases supported before LEFT OUTER JOIN became part of the ANSI standard, the proprietary operator was generally applied to the table that was "missing" rows. DB2 also supports the (+) operator for outer joins in the same way that Oracle does.

答案: 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆