3 ms·
I like nulls too and think they make perfect sense, especially with numeric fields. Suppose we have an "age" field, but don't actually know the age of the pers
by Starwatcher2001 7y ago
I like nulls too and think they make perfect sense, especially with numeric fields.
Suppose we have an "age" field, but don't actually know the age of the person, null makes perfect sense.
Otherwise we'd have do do something like using a "magic number" like 0, -1, or a separate field altogether to indicate an unknown value.
Granted, they do need some handling in queries.
- ilogik 7y agoexcept that age = 0 is valid if your database has toddlers. Hell, even -1 makes sense if you're running a query to get the age of someone at a specific time. this is why you should try to use NULLs whenever possible