-
lovetox
0 day since SQL got me
-
lovetox
SELECT * FROM table WHERE key is not NULL -> returns records SELECT * FROM table WHERE key not in (NULL) -> returns no records
-
jonas’
that looks like the kind of stuff which is not just non-obvious, but will also differ between implementations.
-
lovetox
probably stuff with NULL often differs between implementations
-
lovetox
example indexes with NULL values in it
-
jonas’
indeed
-
lovetox
but the nice thing about sql is, it doesnt matter which question you have, the answer is a search away
-
jonas’
unless you're on oracle
-
singpolyma
That one seems likely to be true on most implementations. Since IN is effectively a version of = and =NULL is usually false
-
lovetox
Question is when is this useful