3 ms·
How can it be unexpected behaviour when it is the behaviour you want! You must not qualify a boolean question for a sgbd like Schroedinger's cat. A boolean co
by whynotmaybe 3y ago
How can it be unexpected behaviour when it is the behaviour you want!
You must not qualify a boolean question for a sgbd like Schroedinger's cat.
A boolean condition in Sql has 3 values :
- true
- false
- unknown ( aka NULL)
For every "unknown" value, the sgbd will NOT decide for you if it's true or false, you have to decide, because it trust you to know what you're doing.
- mrkeen 3y ago> For every "unknown" value, the sgbd will NOT decide for you if it's true or false But it did decide. It could either return the row, or not return the row - there's no middle ground. By not returning the row, it implied that null is not not 'crazy'. If it actually wanted not to decide, it could return an error.
- steego 3y agoRather than make you deal with those pesky errors, we could suppress the errors and only process the records we know how to decide. Win-win?