IS [ NOT ] DISTINCT FROM

Learn how to use the IS [ NOT ] DISTINCT FROM conditional function in PlaidCloud Lakehouse. Compares whether two expressions are equal (or not equal) with...

Compares whether two expressions are equal (or not equal) with awareness of nullability, meaning it treats NULLs as known values for comparing equality.

SQL Syntax

<expr1> IS [ NOT ] DISTINCT FROM <expr2>

SQL Examples

SELECT NULL IS DISTINCT FROM NULL;

┌────────────────────────────┐
 null is distinct from null 
├────────────────────────────┤
 false                      
└────────────────────────────┘