What is a join, and what types are there?
Model answer
A join combines rows from two tables using a related column. INNER JOIN keeps only matching rows. LEFT JOIN keeps all rows from the left table plus matches (NULL where none). RIGHT JOIN is the mirror. FULL OUTER JOIN keeps all rows from both. CROSS JOIN returns every combination.
Learn this topic
SQL JOINs: INNER JOIN and LEFT JOIN Explained in the course SQL for Beginners: Learn Databases Step by Step.
Sign in to add your own answer.
More questions
- What is the difference between INNER JOIN and LEFT JOIN?
- How do you find rows in one table that have no match in another?
- What is a self join?
- What is a CROSS JOIN?
- Why does a missing join condition create duplicate or huge results?
- What is the difference between putting a condition in ON and in WHERE for a LEFT JOIN?