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

# bitmap_xor

> Calculates the set consisting elements unique to lhs and rhs.

Calculates the set consisting elements unique to `lhs` and `rhs`. It is logically equivalent to `bitmap_andnot(bitmap_or(lhs, rhs), bitmap_and(lhs, rhs))` (complementary set).

## Syntax

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

## Examples

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

## keyword

BITMAP\_XOR,  BITMAP


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