Interview Question

Types of JOINs in SQL?

Join types differ mainly in how they handle matches and unmatched rows.

💡 Concept ✅ Quick Revision 🗃️ SQL

Answer

SQL join forms include inner, left outer, right outer, full outer, cross, and self joins. • Inner joins keep matches. • Outer joins preserve specified unmatched rows and fill the missing side with NULL. • Cross joins produce every row combination.

💡 SQL Example

SELECT * FROM a LEFT JOIN b ON b.a_id = a.id;

Result

All rows from a, with matching b rows when present

⚡ Quick Revision

Join types differ mainly in how they handle matches and unmatched rows.