Natural and Inner Joins in Oracle 12c

on October 30, 2015


You can use the NATURAL keyword to indicate that a join should be performed based on all columns that have the same name in the two tables being joined. For example, what titles in BOOK_ORDER match those already in BOOKSHELF?

p0253-01

The natural join returned the results as if you had typed in the following:

p0253-02

The join was performed based on the columns the two tables had in common.

Inner joins are the default—they return the rows the two tables have in common—and are the alternative to outer joins. Note that inner joins support the ON and USING clauses, so you can specify your join criteria as shown in the following listing:

p0253-03

Related Posts

Leave a Reply