Need a reminder as I have to compare Nullable date with Nullable date columns:
Comparing two columns using a normal equal comparison (COL1 = COL2) will be true if both columns contain an equal non-null value. If both columns are null, the result will be false because null is never equal to any other value, not even another null value.
Select case when null = null then 1 else 0 end as NULLNULL ,case when null = 'a' then 1 else 0 end as NULLVALUE ,case when null = 1 then 1 else 0 end as NULLVALUE from sysibm.SYSDUMMY1 NULLNULL|NULLVALUE|NULLVALUE3 0|0|0