Tricky SQL Server, developer should know

Amatya
Posted by Amatya under Sql Server category on | Points: 40 | Views : 1104
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: Tonystark on: 12/23/2017 Level:Starter | Status: [Member] | Points: 10
Nice article. Thanks for this post for http://fireboywatergirl.me you must loves to play this it is really an classic and fantastic post thanks for sharing this.
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