Oracle sql—此处(+;)表示什么

Oracle sql—此处(+;)表示什么,sql,oracle,Sql,Oracle,我知道(+)可以用来表示oracle sql中的外部联接。 这个代码中的(+)是什么意思 where sysdate between start_date(+) and end_date(+) 它允许外部连接在where子句条件下“生存”。i、 它还允许返回空值。e、 g.下文 select * from from_table ft, outer_table ot where sysdate between ot.start_date(+) and ot.end_date(+) and f

我知道(+)可以用来表示oracle sql中的外部联接。 这个代码中的(+)是什么意思

where sysdate between start_date(+) and end_date(+) 

它允许外部连接在where子句条件下“生存”。i、 它还允许返回空值。e、 g.下文

select *
from from_table ft, outer_table ot
where sysdate between ot.start_date(+) and ot.end_date(+) 
and ft.id = ot.ft_fk(+)
这方面的一个等价物可以是:

select *
from from_table ft
left join outer_table ot on ft.id = ot.ft_fk and sysdate between ot.start_date and ot.end_date
select *
from from_table ft
left join outer_table ot on ft.id = ot.ft_fk
where (sysdate between ot.start_date and ot.end_date OR ot.start_date IS NULL)
或者,这方面的等价物可以是:

select *
from from_table ft
left join outer_table ot on ft.id = ot.ft_fk and sysdate between ot.start_date and ot.end_date
select *
from from_table ft
left join outer_table ot on ft.id = ot.ft_fk
where (sysdate between ot.start_date and ot.end_date OR ot.start_date IS NULL)

这意味着查询的编写者正在使用过时的连接语法,并且应该学习如何使用适当的显式连接,特别是对于外部连接。如果Oracle仍然支持它,它怎么可能是过时的呢?(笑话)但是它是专有的、非标准的,没有理由使用它,因为Oracle已经支持标准的外部连接语法很多年了。我从他那里学到的那个家伙刚刚离开我的公司,他非常喜欢使用+。非常感谢这个社区的帮助。我不认为这是一个重复的问题,把它作为一个独立的问题可能会帮助像我这样的新手寻找解决方案。@BillKarwin,至少有一个例外:当你想创建具有快速刷新的物化视图时,你必须使用旧的Oracle样式来加入。Oracle认为这是“缺乏文档”,而不是一个bug!我不知道这一行为在最近的Oracle版本(即12.2)中是否有所改变@WernfriedDomscheit,我仍然对Oracle感到失望。太好了!谢谢你的帮助!