2 ms·
So the problem is with SQL, because NULL doesn't act the same as false, and boolean operators may give incorrect results if you expect them to? I'm not sure how
by crazygringo 4y ago
So the problem is with SQL, because NULL doesn't act the same as false, and boolean operators may give incorrect results if you expect them to? I'm not sure how to respond if you think people shouldn't be in the headspace of SQL.
- echelon 4y agoIn SQL you won't typically coerce null to false, though there are mechanisms to accomplish this (which can be useful for analytics, ETLs, etc). Presence is first class and is probably what you want in your business logic queries. If you let the SQL query predicates handle which records to select, I'm not sure I see the problem you originally outlined. Why do you care what value the timestamp has when the question is whether or not a record experienced an event.