What is NULL in SQL? | LeetCode 584 - Find Customer Referee | SQL 50 Day 2

Day 2 of LeetCode SQL 50 Study Plan! In this video, we solve LeetCode 584 - Find Customer Referee. This problem looks very simple at first, but it teaches one of the most important concepts in SQL — NULL. Most beginners make the mistake of writing WHERE referee_id != 2 and wonder why their answer is wrong. In this video, we explain exactly why that query fails and how to fix it the right way. What you will learn: What NULL means in SQL Why comparing NULL with = or != never works How to use IS NULL correctly How the OR operator helps handle NULL values Final Solution: SELECT name FROM Customer WHERE referee_id != 2 OR referee_id IS NULL; This is part of our LeetCode SQL 50 Study Plan series where we solve one SQL problem every day, starting from beginner level and going all the way to advanced. If you are new to SQL, this series is for you. #SQL #LeetCode #SQLforBeginners #LeetCodeSQL50 #JDCodeBase #NULLinSQL #SQLTutorial #CodingInterview