xxxxxxxxxx
In SQL, a join is used to compare and combine — literally join — and
return specific rows of data from two or more tables in a database.
An inner join finds and returns matching data from tables,
while an outer join finds and returns matching data and some dissimilar
data from tables
INNER JOIN :
The inner join will keep only the information from the two joined tables
that is related.
OUTER JOIN:
There are three types of outer joins:
Left Outer Join (or Left Join)
Right Outer Join (or Right Join)
Full Outer Join (or Full Join)
xxxxxxxxxx
There really is no difference between a LEFT JOIN and a LEFT OUTER JOIN.
Both versions of the syntax will produce the exact same result in PL/SQL.
Some people do recommend including outer in a LEFT JOIN clause so it's
clear that you're creating an outer join, but that's entirely optional
xxxxxxxxxx
SELECT * FROM TableA AS a INNER JOIN TableB AS b USING (Column1);
SELECT * FROM TableA AS a INNER JOIN TableB AS b ON a.Column1 = b.Column1;
xxxxxxxxxx
INNER JOIN:
is used when retrieving data from multiple
tables and will return only matching data.
FULL OUTER JOIN:
is used when retrieving data from
multiple tables and will return both
table records, matching and non-matching.
xxxxxxxxxx
They are functionally equivalent, but INNER JOIN can be a bit clearer to read, especially if the query has other join types (i.e. LEFT or RIGHT or CROSS) included in it.