Tricky SQL Server, developer should know

Amatya
Posted by Amatya under Sql Server category on | Points: 40 | Views : 2196
Tricky SQL Server, developer should know the concept of 'IS' in SQL Server
select case when null = null then 'True' else 'False' end as Result;

Output: False
False ! The reason is the proper way to compare a value in SQL server is using 'IS' operator and not using '='.

select case when null Is null then 'True' else 'False' end as Result;

Output: True

Thanks
Amatya

Comments or Responses

Posted by: Gabriel on: 10/23/2017 Level:Starter | Status: [Member] | Points: 10
Exceptional publish.Many thanks for http://123essay.org/customwritings-com-review/ sharing this information.Really,Your website is just not only instructive but helpful too.
Posted by: Sloperun3az on: 5/4/2018 Level:Starter | Status: [Member] | Points: 10
Well, this is my first visit to your blog! Your blog provided us valuable information .You have done a marvelous job
- http://sloperun3.com

Login to post response