In SQL, what is the difference between IS and =?

Do they work the same?

No, the = operator won’t work properly with NULL. You’d have to write IS NULL or IS NOT NULL.

1 Like

So the only difference is that = won’t work with NULL. Thanks!

I always find this helps:

= checks if equal, but you can not equal nothing.


Wow! I really like this analogy thanks so much.

1 Like

That 4th image is a dire scenario…


3rd image is very desperate, 4th is dire indeed.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.