← Back to context

Comment by throwayEngineer

7 years ago

So if you can handle the "complexity" of SQL and don't use NULL, SQL is fine?

> don't use NULL

I'm not sure this part is realistic to do in a non-trivial setup. At the very least it's not a common thing to do.

  • You either have actual NULLs in your tables or you have implied NULLs that don't exist in the actual tables but still come up when you do LEFT JOINs etc.

    I don't think NULLs are actually a problem in SQL. It's not like we're talking about pointers, it won't cause your server to crash if you use them wrong. NULLs in SQL are fine.

    • They're far worse than null pointers. They can cause subtle bugs that lead to queries that appear to work but result in missing or incorrect data.