DB options: ANSI Nulls ON

Опубликовано: 01 Ноябрь 2024
на канале: Jayanth Kurup
3,370
33

ANSI NULLS dictate how SQL Server responds when the equal to (=) operator is used to check for NULLs. Keep in mind that the IS NULL condition works regardless of what ANSI NULL setting is used. When ANSI NULLS are ON using a query like ColA =NULL will not return any results. Setting ANSI NULLS to OFF will return results when the query uses ColA =NULL. In this video we show that IS NULL check performs faster and therefore this setting is practically useless in any real world database design / programming. Luckily it’s on its way out. This option is always going to default on ON in future but it is also part of ANSI DEFAULTs setting where in Session context it is always set to ON. Yet again in this video we see a database option that is overridden at the session level and therefore doesn’t serve any purpose.

Need more information? Visit https://www.enabledbusinesssolutions.com

To know more about Jayanth Kurup visit http://www.jayanthkurup.com

Jayanth is a Microsoft SQL Server trainer / consultant with over 15 years’ experience. He has worked with companies like Microsoft, IBM, HCL, Wipro, Well Fargo, Zeomega and many more. He is based out of Bangalore and a very active member of the SQL Server Community.

In this channel he covers complex topics related MS SQL Server , PowerBI , Azure , AWS , Powershell, SSIS , SSAS , SSRS , Machine Learning , AI , etc

You can also reach Jayanth via his LinkedIn profile below   / jayanth-k.  .

music from HAAWK