WAS v8.5 > Develop applications > Develop Dynamic and EJB query > Develop applications that use EJB query > EJB query language > WHERE clause > WAS, Expressions

Null value semantics

The following describe the semantics of NULL values.

Null value semantics. The following table describes the semantics of NULL values.

AND True False Unknown
True True False Unknown
False False False False
Unknown Unknown False Unknown

Null value semantics. The following table describes the semantics of NULL values.

OR True False Unknown
True True True True
False True False Unknown
Unknown True Unknown Unknown

Null value semantics. The following table describes the semantics of NULL values.

  NOT
True False
False True
Unknown Unknown


Example: Null value semantics

If salary is NULL the evaluation of e.salary > 10 returns unknown and the employee object is not returned. If the cmr field dept or budget is NULL evaluation of e.dept.budget > 100 returns unknown and the employee object is not returned.

In J2EE 1.3 if dept or budget is NULL evaluation of e.dept.budget is null returns TRUE and the employee object is returned. In J2EE 1.4 the employee object is returned only if budget is NULL.

If dept is NULL, then the multivalued path expression e.dept.emps results in an empty collection (not a collection containing a NULL value). An employee with a null dept value will not be returned.

If dept is NULL the evaluation of the predicate in unknown and the employee object is not returned.

If dept is NULL evaluation of the member of predicate returns unknown and the employee is not returned.


Related concepts:

EJB query language
WHERE clause
WAS, Expressions


Related


Use EJB query


+

Search Tips   |   Advanced Search