Solved

SQL Where statement - column_name(+)

Posted on 2013-01-07
5
461 Views
Last Modified: 2013-01-07
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
Comment
Question by:ktylerconk
  • 2
  • 2
5 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38752342
It is the old OUTER JOIN Oracle syntax.
0
 
LVL 45

Accepted Solution

by:
Kent Olsen earned 25 total points
ID: 38752347
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
 

Author Closing Comment

by:ktylerconk
ID: 38752358
Thank you Kent!!
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38752365
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
 

Author Comment

by:ktylerconk
ID: 38752403
Thank you for the great article slightwv!  It should help me!
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to recover a database from a user managed backup

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question