# IS NOT DISTINCT FROM

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: IS NOT DISTINCT FROM
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/sql-functions/boolean-functions/is-not-distinct-from-operator
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-functions/boolean-functions/is-not-distinct-from-operator.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-functions/boolean-functions/is-not-distinct-from-operator.adoc
description: The IS NOT DISTINCT FROM operator is a counterpart to IS DISTINCT FROM.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-functions/boolean-functions/is-not-distinct-from-operator.md -->

## [](#overview)Overview

The `IS NOT DISTINCT FROM` operator is a counterpart to `IS DISTINCT FROM`.

It compares two values, treating them as equal even when they are both `NULL`. This operator returns `TRUE` if the two values are the same, including the case where both values are `NULL` and `FALSE` if they are different.

## [](#syntax)Syntax

The syntax for this function is:

```sql
value1 IS NOT DISTINCT FROM value2
```

Where:

-   `value1` is the first value for comparison.

-   `value2` is the second value for comparison.


## [](#examples)Examples

### [](#basic-usage)Basic usage

Consider this example, which compares two values:

**Example 1**

```sql
SELECT 45 IS NOT DISTINCT FROM 45 AS "Result";
```

The preceding query returns the output:

```sql
 Result
--------
 t
```

**Example 2**

```sql
SELECT 60 IS NOT DISTINCT FROM 30 AS "Result";
```

The preceding query returns:

```sql
 Result
--------
 f
```

**Example 3**

```sql
SELECT NULL IS NOT DISTINCT FROM NULL AS "Result";
```

The preceding query returns:

```sql
 Result
--------
 t
```

### [](#compare-null-values)Compare NULL values

In this example, NULL values are compared using the IS NOT DISTINCT FROM operator:

**Example 1**

```sql
SELECT NULL IS NOT DISTINCT FROM 80 AS "Result";
```

The preceding query returns:

```sql
 Result
--------
 f
```

**Example 2**

```sql
SELECT 5 IS NOT DISTINCT FROM NULL AS "Result";
```

The preceding query returns:

```sql
 Result
--------
 f
```

### [](#analyze-data-completeness)Analyze data completeness

Suppose there is a table named customer\_contacts that stores customer contact information.

```sql
CREATE TABLE customer_contacts (
  customer_id INT,
  email TEXT,
  phone TEXT
);

INSERT INTO customer_contacts VALUES
(101, 'john@example.com', NULL),
(102, NULL, '+1234567890'),
(103, 'jane@example.com', '+9876543210'),
(104, NULL, NULL),
(105, 'alex@example.com', '+5555555555');
```

The objective is to retrieve records from this table where an email address or a phone number is available for contacting the customers.

```sql
SELECT *
FROM customer_contacts
WHERE email IS NOT DISTINCT FROM phone;
```

This query retrieves all rows from the `customer_contacts table` where the email and phone are NULL. The result shows that the customer with `customer_id 104` has no phone number or email address.

```sql
 customer_id | email | phone
-------------+-------+-------
         104 |       |
```