Difference between " ANY(…)" and "NOT = ANY(…)"?
NOT sid = ANY (SELECT ...) 


is equivalent to:

sid &lt;&gt; ALL (SELECT ...)  


So, your two conditions are not the same.



ALL and ANY operators are hard for me (and many people) to use. I think that's how many prefer to use IN, NOT IN, EXISTS and NOT EXISTS which result in more self-explanatory code.

If you do want to work with them, think that sid = ANY (SELECT ...) means "check if sid is equal to any (some) of the (select...) values".

Then the NOT sid = ANY (SELECT ...) is the opposite of that. But the opposite of "equal to any of them" is "different to all of them" (and not "different to some of them").