Alternative syntaxes: NATURAL JOIN
An more extreme and much less useful form of
"EQUI" JOINis the
NATURAL JOINclause. The previous example could be further “improved” by replacing
NATURAL JOINlike this:SELECT * FROM actor NATURAL JOIN film_actor NATURAL JOIN film
Notice how we no longer need to specify any
JOINcriteria, because a
NATURAL JOINwill automatically take all the columns that share the same name from both tables that it joins and place them in a “hidden”
USINGclause. As we’ve seen before, as primary keys and foreign keys have the same column name, this appears quite useful.
There is a high likelihood that you will learn at least one new thing here; for example, check out lateral joins (which SQL Server practitioners know as something else).