beginnerJOINs — INNER, LEFT, RIGHT, FULL, SELF, CROSS

What is the difference between INNER JOIN, LEFT JOIN, and FULL OUTER JOIN?

INNER JOIN returns only rows where the join condition is true for BOTH tables — unmatched rows from either table are excluded. LEFT JOIN returns ALL rows from the left table and matched rows from the right; unmatched right rows are NULL. RIGHT JOIN is the mirror of LEFT JOIN. FULL OUTER JOIN returns all rows from BOTH tables; where no match exists, the other side is NULL. Venn diagram: INNER = int

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.

What is the difference between INNER JOIN, LEFT JOIN, and FULL OUTER JOIN?

Next Step

Continue to A LEFT JOIN is unexpectedly returning the same results as INNER JOIN. Why?← Back to all SQL questions