May 2020
Beginner
564 pages
14h 9m
English
A NATURAL JOIN will associate columns of the same name in the joined tables with each other. It's similar to an INNER JOIN or a LEFT OUTER JOIN.
To NATURAL JOIN two tables, use the following syntax:
SELECT column(s)FROM table1NATURAL JOIN table2;
The previous syntax shows you how to join two tables together with NATURAL JOIN. You explicitly set the columns to be joined.
The following example will help you to understand how to use NATURAL JOIN:
SELECT c.playerid, c.schoolid, c.yearid, s.schoolid, city, state, country FROM lahmansbaseballdb.collegeplaying c NATURAL JOIN lahmansbaseballdb.schools s;
You will receive the results from the previous query, as shown in the following screenshot: ...
Read now
Unlock full access