Reviewed by Aditya Kumar · Last reviewed 2026-03-24
**INNER:** Matching rows only. **LEFT:** All left + matches (NULL right where no match). **RIGHT:** All right + matches. **FULL:** All both, NULL where no match. **CROSS:** Cartesian product. A(1,2), B(2,3). INNER:(2,2). LEFT:(1,null),(2,2). RIGHT:(2,2),(null,3)....
INNER: Matching rows only. LEFT: All left + matches (NULL right where no match). RIGHT: All right + matches. FULL: All both, NULL where no match. CROSS: Cartesian product.
A(1,2), B(2,3). INNER:(2,2). LEFT:(1,null),(2,2). RIGHT:(2,2),(null,3). FULL:(1,null),(2,2),(null,3). CROSS: 6 rows. Use LEFT to preserve primary table; INNER when both must match.
Red Flag: CROSS join by accident. Pro-Move: 'We default to LEFT for fact-dimm joins; INNER only when we want to drop orphans.'
According to DataEngPrep.tech, this is one of the most frequently asked SQL interview questions, reported at 1 company. DataEngPrep.tech maintains an editor-reviewed database of 1,863 data engineering interview questions across 7 categories.