This is expected. =NULL will never work as NULL is not a value, it isn't
anything really. - and therefore it cannot be equal to anything.

You always have to use IS NULL.






-----Original Message-----
From: Will Tomlinson [mailto:[EMAIL PROTECTED] 
Sent: 09 February 2006 10:27
To: CF-Talk
Subject: IS NULL VS = NULL

SQL Server - I had a situation where I needed to make sure a field was NULL.
So I used WHERE the field = NULL. It didn't return any records, but it
should've. 

So I changed it to WHERE thefield IS NULL, and it works fine. 

Why is this? What's the difference between = NULL and IS NULL?

Thanks,
Will



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231715
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to