> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# bitmap_andnot

> Returns bitmap values that exist in lhs but do not exist in rhs, and returns the new bitmap.

Returns bitmap values that exist in `lhs` but do not exist in `rhs`, and returns the new bitmap.

## Syntax

```Haskell theme={null}
bitmap_andnot(BITMAP lhs, BITMAP rhs)
```

## Examples

```plain text theme={null}
mysql> select bitmap_to_string(bitmap_andnot(bitmap_from_string('1, 3'), bitmap_from_string('2'))) cnt;
+------+
|cnt   |
+------+
|1,3   |
+------+

mysql> select bitmap_to_string(bitmap_andnot(bitmap_from_string('1,3,5'), bitmap_from_string('1'))) cnt;
+------+
|cnt   |
+------+
|3,5   |
+------+
```

## keyword

BITMAP\_ANDNOT, BITMAP


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.