This topic describes how to use the logical function IS NOT DISTINCT FROM in Realtime Compute.

Syntax

A IS NOT DISTINCT FROM B

Input parameters

Parameter Data type
A Any data type
B Any data type

Description

  • If the data types or values of A and B are different, false is returned.
  • If the data types and values of A and B are the same, true is returned.
  • If both A and B are null, true is returned even when their data types are different.

Example

  • Test data
    A (INT) B (VARCHAR)
    97 97
    null sss
    null null
  • Test statements
    SELECT 
    A IS NOT DISTINCT FROM B as `result`
    FROM T1;      
  • Test results
    result (BOOLEAN)
    false
    false
    true