Click here to Skip to main content
15,868,049 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a job interview they asked me what is the difference between is null and = null in sql

for example,

select * from emp where comm = null

OR

select * from emp where comm is null

in SQL Server if we set SET ANSI_NULLS ON the COMM =NULL does not show any result, can any one explain this, thanks

What I have tried:

I said when we are working in SQL so we have to use SET ANSI_NULLS OFF, and they asked me so what is the reason they set ANSI_NULLS ON, I do not have any answer about this,
Posted
Updated 1-Oct-22 17:17pm

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900