DB-aha
asked on
Oracle (+) Join Syntax SQL
I am reviewing some code and I am having a hard time grasping the concept of the (+) used in oracle to create joins. I have not been able to find a simple explanation online that explains this in great detail. Here are examples of how I have seen this code written in the code I am reviewing
SELECT *
FROM Tablename
WHERE a.column1 = b.column1(+)
SELECT *
FROM Tablename
WHERE a.column1 (+) NOT IN ('a', 'b')
SELECT *
FROM Tablename
WHERE a.column1(+) = b.column1
I cannot understand the differences of any of these.
SELECT *
FROM Tablename
WHERE a.column1 = b.column1(+)
SELECT *
FROM Tablename
WHERE a.column1 (+) NOT IN ('a', 'b')
SELECT *
FROM Tablename
WHERE a.column1(+) = b.column1
I cannot understand the differences of any of these.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have a good understanding of joins when they are written in the traditional ANSI standard. The issue is using this (+) as a joion rather than the ANSI standard. Other than saving writing time and space within code, I don't see the purpose of using this notation.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
All very useful information. Thanks all!
ASKER
SELECT *
FROM Tablename A, Tablename B
WHERE a.column1 (+) NOT IN ('value1', 'value2')