Using SQL NULLIF with Missing Values | Essential SQL

Published: 27 July 2021
on channel: Essential SQL (EssentialSQL)
2,167
62

The NULLIF is a nice short hand way to compare for missing values within columns contains both NULL and blank values.
--------------------
This video is part of my Beginner Learning series. If you're interested in learning SQL subscribe to @Essential SQL and then check out our Beginner Learner Playlist.

Of course, I also encourage you to visit https:\\www.essentialsql.com to learn even more!

----------------------
Here are the example I used in the video, use them to learn more about NULL IF and play around with it's features:

SELECT FirstNAme, MiddleName, LastName
FROM Person.Person
WHERE NULLIF(MiddleName,'') IS NULL



SELECT FirstNAme, MiddleName, LastName
FROM Person.Person
WHERE case when MiddleName = '' then NULL else MiddleName end IS NULL



SELECT FirstNAme, MiddleName, LastName
FROM Person.Person
WHERE IIF(MiddleName = '',NULL,MiddleName) IS NULL


On this page of the site you can watch the video online Using SQL NULLIF with Missing Values | Essential SQL with a duration of hours minute second in good quality, which was uploaded by the user Essential SQL (EssentialSQL) 27 July 2021, share the link with friends and acquaintances, this video has already been watched 2,167 times on youtube and it was liked by 62 viewers. Enjoy your viewing!