📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

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 │ └────────────────────────────┘

Was this page helpful?