SQL Function |
Comparison Test |
Return Value |
NULLIF(ex1,ex2) |
ex1 = ex2 |
True returns NULL
False returns ex1 |
ISNULL(ex1,ex2) |
ex1 = NULL |
True returns ex2
False returns ex1 |
IFNULL(ex1,ex2) [two-argument form] |
ex1 = NULL |
True returns ex2
False returns NULL |
IFNULL(ex1,ex2,ex3) [three-argument form] |
ex1 = NULL |
True returns ex2
False returns ex3 |
{fn IFNULL(ex1,ex2)} |
ex1 = NULL |
True returns ex2
False returns ex1 |
NVL(ex1,ex2) |
ex1 = NULL |
True returns ex2
False returns ex1 |
COALESCE(ex1,ex2,...) |
ex = NULL for each argument |
True tests next ex argument. If all ex arguments are True (NULL), returns NULL.
False returns ex |