Skip to main content

IS [ NOT ] DISTINCT FROM

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

Syntax

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

Examples

SELECT NULL IS DISTINCT FROM NULL;

┌────────────────────────────┐
null is distinct from null
├────────────────────────────┤
false
└────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today