Reviewed by Aditya Kumar · Last reviewed 2026-03-24
With NULL in join keys: INNER returns 0 rows for null keys (no match). LEFT: left rows with null key preserved, right columns null. RIGHT: right rows with null key preserved, left null. FULL: all from both, nulls where no match. Test with small tables to verify. **Why it...
With NULL in join keys: INNER returns 0 rows for null keys (no match). LEFT: left rows with null key preserved, right columns null. RIGHT: right rows with null key preserved, left null. FULL: all from both, nulls where no match. Test with small tables to verify. Why it matters: Design choices compound at scale—wrong approach can cause 100× overhead. Scalability trade-offs: Profile before optimizing; validate on sample then full. Cost implications: Suboptimal choices multiply at billion-row scale.
Red Flag: Using null keys in joins without explicit handling—NULL=NULL is UNKNOWN. Pro-Move: 'We normalized with COALESCE(key,-1) in join; documented null semantics in data contract.'
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.