I am just curious - I know about NULL safe equal operator <=>, but is there some NULL safe NOT equal operator? Or I have to always use something like this
<=>
Now MySQL does not have a NULL-safe not equal operator.
Using MySQL the most universal solution is:
!(tab.id <=> 1)
or
NOT tab.id <=> 1
because it will work properly if even in place of 1 you will use NULL.
1
NULL