跳到主要内容

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
└────────────────────────────┘
开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册