Forum OpenACS Q&A: Response to NULL SQL issues

Collapse
Posted by Don Baccus on
Jade's almost right ... the *only* possible returned value is NULL according to the SQL 92 standard (as opposed to "One of the possible meanings for NULL is 'value not known'  It's the *only* value for NULL that's returned)

"value not null" is *always* the semantic.  Well, SQL92 is wishy-washy on it in many widely-critiqued circumstances but this isn't one of them.

SQL defines three-valued semantics and you need to understand the consequences inside or out to make sense of expressions which include null.

As noted, you can avoid the complexities by whacking your code so nulls never exist (a symptom of SQL92's weaknessesw/inconsistencies more than with the concept itself).