| ▲ | mrkeen 3 hours ago | ||||||||||||||||
I won't push back on it being garbage, but I would suggest that if enough people did it that way it would be the new normal, and apologists would fall out of the woodwork, e.g. [1] I complain that mainstream SQL engines have no problem returning less than the total number of rows if you first query WHERE column = NULL and then query WHERE column <> NULL. Your example queries remind me of that. [1] https://medium.com/dailyjs/the-why-behind-the-wat-an-explana... | |||||||||||||||||
| ▲ | semiquaver 2 hours ago | parent | next [-] | ||||||||||||||||
With respect, your statement seems to indicate that you simply haven’t heard of or don’t understand the three-valued-logic semantics behind SQL.NULL means what it means and is conceptually foundational to SQL. Comparing it to anything returns UNKNOWN, the “third value” besides true and false. And WHERE needs a TRUE predicate. So your implied fault that they “have no problem“ really is just a matter of you not understanding the tool you are complaining about. To match against the NULLness of a value you must use special purpose operators. In this case | |||||||||||||||||
| |||||||||||||||||
| ▲ | CodesInChaos 2 hours ago | parent | prev [-] | ||||||||||||||||
I am rather receptive to the argument that SQL is a fractal of bad design. But complaining that SQL engines implement well known SQL semantics according to spec is silly. | |||||||||||||||||