Skip to content
Advertisement

What expression could allow a tuple with NULL attribute to pass

For common expression like a + b > 5, it is obvious that as long as b or a is NULL, the the expression would not be true. In other words, the the null attribute could not pass this expression.

However, expression like coalesce could allow a tuple with NULL attribute to pass. For example, coalesce(a,b) > 0, even if a is NULL, as long as b > 0, then this tuple could still pass.

My question is that except coalesce, is there any other common expression could allow a tuple with null attribute to possibly pass the condition test?

Advertisement

Answer

Here are some standard expressions that pass for NULL values:

Some databases have synonyms for coalesce()-like functionality — nz(), ifnull(), nvl() come to mind.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement