SQL NULL is Crazy! Lets see how NULL affects Expressions and Comparisons within SQLServer

preview_player
Показать описание
If you're working with SQL NULL and getting inconsistent results, then watch this video to see how NULL affects your expressions and comparisons.

--------------------
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.

Рекомендации по теме
Комментарии
Автор

Never gave it that much thought before, thank you Kris.

zezeandjr
Автор

Yes. I found, it's a great learning using all your tech tips.

sagardudhawade
Автор

Is there any differences between using ISNULL and COALESCE?

patrickdesgrange
Автор

One Example using Case statement is also very strange. Run following SQL and find out

DECLARE @DOD AS DATE = null
SELECT @DOD,
CASE WHEN @DOD IS NULL THEN 'False' ELSE 'True' End As IsDeceased,
CASE @DOD WHEN NULL THEN 'False' ELSE 'True' End As IsDeceased1

😀

psadhikary
Автор

NULL and dates is interesting too. Test out in VB code as like year 1899. Yet, there it is in the db...NULL.

boydwhite