Forum OpenACS Q&A: Response to String concatenation w/nulls

Collapse
Posted by Don Baccus on
I think "nothing" vs "unknown" is just semantics
Sure, but the fact that one's not equal to zero is also "just semantics".

This doesn't mean the distinction has no meaning, though ...

The difference between "nothing" and "unknown" is significant and meaningful. I see no reason why the "||" operator should treat the "unknown" case as being the empty string, this would be entirely inconsistent with the treatment of NULL elsewhere.

Now, there are many arguments against the adoption of three-valued logic in the first place, and SQL92 itself isn't entirely consistent in its adoption of three-valued logic (read Date & Darwin's "An Introduction to the SQL Standard" for a full discussion).

But given the fact that SQL92 does have three-valued logic, there's no real reason to complain when they *have* been consistent.