July 2010
Intermediate to advanced
840 pages
16h 33m
English
Most vendors propagate NULLs in the functions they offer as extensions of the standard ones required in SQL. For example, the cosine of a NULL will be NULL. There are two functions that convert NULLs into values:
| 1. | NULLIF (V1, V2) returns a NULL when the first parameter equals the second parameter. The function is equivalent to the following case specification:
CASE WHEN (V1 = V2) THEN NULL ELSE V1 END |
| 2. | COALESCE (V1, V2, V3, ..., Vn) processes the list from left to right and returns the first parameter that is not NULL. If all the values are NULL, it returns a NULL. |
Read now
Unlock full access