NULLIF


An easier way to return null when two expressions (columns) contain the same value

SELECT e.last_name, NULLIF(e.job_id, j.job_id) "Old Job ID"
    FROM employees e, job_history j
    WHERE e.employee_id = j.employee_id;

LAST_NAME                 Old Job ID
------------------------- ----------
De Haan                   AD_VP
Kochhar                   AD_VP
Kochhar                   AD_VP
Hartstein                 MK_MAN
Raphaely                  PU_MAN
Kaufling                  ST_MAN
Whalen
Taylor
Taylor                    SA_REP
Whalen                    AD_ASST