SQL for Data Science Day 20 | Null Functions | SQL Null Functions | ISNULL | COALESCE | NULLIF
Автор: Bhuvnesh bhatt
Загружено: 2025-11-22
Просмотров: 22
Описание:
In this lesson, we cover one of the most confusing but MOST important concepts in SQL — NULL values.
You’ll learn how to correctly handle NULLs using the most commonly used SQL Server functions:
✅ What You’ll Learn Today
1️⃣ ISNULL() – Replace NULL with a default value
2️⃣ COALESCE() – Return the first non-NULL value
3️⃣ NULLIF() – Turn matching values into NULL
4️⃣ ISNULL in Calculations – Prevent NULL math errors
5️⃣ COALESCE with Multiple Fallbacks – Smart NULL handling
🧠 IMPORTANT CLARIFICATION
❌ 'Null', ' ', 0, 'NA', 'Unknown' → Not NULL
✔️ NULL → Truly missing value
📊 Sample table used in the video
We work with a Payments table containing Amount, Discount, and CouponCode — with some NULL values.
🧪 Functions you will practice:
Replace NULL with 0
Return first available (non-null) value
Set 0 → NULL using NULLIF
Perform calculations safely
Provide fallback text when coupon is missing
🔥 By the end of this video, you will NEVER be confused by NULLs again!
💬 Ask doubts in comments — I reply to EVERY SQL question.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: