• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 519
  • Last Modified:

SQL Where statement - column_name(+)

I have inherited some old code and am wondering why the (+) was coded in this statement, as I have never seen it used before, and can find no reference to it on the internet.

WHERE        c.CASE_NUMBER = cz.CASE_NUMBER(+)

Thanks
0
ktylerconk
Asked:
ktylerconk
  • 2
  • 2
1 Solution
 
slightwv (䄆 Netminder) Commented:
It is the old OUTER JOIN Oracle syntax.
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi tyler,

That's a legacy style of coding an outer join.

In the early days of SQL there were only inner joins.  When outer joins were added, Oracle adopted the (+) syntax to describe that the table is being outer joined.  (I've never cared for the syntax.)

As far as I know, it's not supported by any other vendor, and is deprecated by Oracle.  The Oracle SQL parser still accepts the syntax, but you shouldn't use it to code new SQL projects.


Good Luck,
Kent
0
 
ktylerconkAuthor Commented:
Thank you Kent!!
0
 
slightwv (䄆 Netminder) Commented:
Here is the doc link that talks about it:

http://docs.oracle.com/cd/E11882_01/server.112/e26088/queries006.htm#SQLRF52354

I'm on fence with Kdo's post.  I've been Oracle and only Oracle for so long, I've still not quite mastered the ANSI join syntax and find it confusing (but I also haven't taken the time to figure it out).
0
 
ktylerconkAuthor Commented:
Thank you for the great article slightwv!  It should help me!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now