Tricky SQL Server, developer should know

Amatya
Posted by Amatya under Sql Server category on | Points: 40 | Views : 702
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.

Login to post response