jdev - 2024-05-04


  1. lovetox

    0 day since SQL got me

  2. lovetox

    SELECT * FROM table WHERE key is not NULL -> returns records SELECT * FROM table WHERE key not in (NULL) -> returns no records

  3. jonas’

    that looks like the kind of stuff which is not just non-obvious, but will also differ between implementations.

  4. lovetox

    probably stuff with NULL often differs between implementations

  5. lovetox

    example indexes with NULL values in it

  6. jonas’

    indeed

  7. lovetox

    but the nice thing about sql is, it doesnt matter which question you have, the answer is a search away

  8. jonas’

    unless you're on oracle

  9. singpolyma

    That one seems likely to be true on most implementations. Since IN is effectively a version of = and =NULL is usually false

  10. lovetox

    Question is when is this useful