ZZomato·BehavioralL2DSA Round

Types of SQL Joins (DBMS)

viaLeetCode

Question: What are the different types of joins in SQL/DBMS, and what does each one do?

Answer outline: INNER JOIN returns only matching rows between two tables. LEFT (OUTER) JOIN returns all rows from the left table plus matched rows from the right (NULLs where no match). RIGHT (OUTER) JOIN is the mirror of LEFT JOIN. FULL (OUTER) JOIN returns all rows from both tables, matching where possible and NULL-filling elsewhere. CROSS JOIN returns the Cartesian product of both tables. SELF JOIN joins a table to itself, typically via aliasing, to compare rows within the same table.

Add a follow-up question they asked
No follow-ups yet. Be the first to add one.
asked …
LeaderboardSalary
Language
Account