Home >> Oracle >> Outer Join in Oracle

Outer Join in Oracle

It is used to preserve the missing information resulting from natural join OR inner join.

R1 table

A           B           C

X           10         100

Y           20         100

Z           30         200

S           40         400

R2 table

C           D

100        L

200        M

300        N

100        T

Missing element in natural join.

Left outer join

Natural Join + Missing information LHS

Output

A       B       C       D

X       10     100      L

Y       20     100     L

Z       30      200     M

X       10     100      T

Y       20     100     T

S       40      400    -

Right outer join

Natural Join + Missing information RHS

Output

A       B       C       D

X       10     100      L

Y       20     100     L

Z       30      200     M

X       10     100      T

Y       20     100     T

-         -       300    N

Full outer join

Natural Join + Missing information LHS + Missing information RHS

Output

A       B       C       D

X       10     100      L

Y       20     100     L

Z       30      200     M

X       10     100      T

Y       20     100     T

-         -       300    N

S       40      400    -

Post Your Comment

Next Questions
Self Join
Cross Join
Equi Join
Anti Join
Semi Join
Create database
Drop database
Create table
Drop table
Truncate table
Alter Table
Create table AS
Global Temporary tables
SELECT Query
INSERT Query
INSERT ALL Query
UPDATE Query
DELETE Query
WHERE clause
AND Clause
OR Clause
LIKE clause
IN clause
ORDER BY Clause
GROUP BY Clause

Copyright ©2022 coderraj.com. All Rights Reserved.