DECODE, NULLIF, NVL, and NVL2 in Oracle Most of Oracle’s built-in functions are designed to solve a specific problem. Table below shows the syntax and logic equivalent for each of four functions. Syntax Logic equivalent DECODE(V1, V2, V3, V4) IF V1 = V2 THEN V3 ELSE V4 NULLIF(V1, V2) IF V1 = V2 THEN NULL ELSE V1 NVL(V1, V2) IF V1 IS NULL THEN V2 ELSE V1 NVL2(V1, V2, V3) IF V..