A.2. SQL and databases
A.2.1. Types of joins
Explain the difference between a left join and an inner join.
Ludamila Janda and Ayanthi G.
Example answer
Joins are ways of combining data from two different tables—a left table and a right table—into a new one. Joins work by connecting rows between the two tables; a set of key columns is used to find data in the two tables that are the same and should be connected. In the case of a left join, every row from the left table appears in the resulting table, but rows from the right table appear only if the values in their key columns show up in the left table. In an inner join, however, both rows from the left table and the right table appear only if there is a matching row in the other table.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access