Performs a NOT operation on two BITMAPs and returns the number of elements in the result set. The first input parameter is called base BITMAP and the second is called exclusion BITMAP.
BITMAP_AND_NOT_COUNT(<bitmap1>, <bitmap2>)
| Parameter | Description |
|---|---|
<bitmap1> | Base BITMAP to be negated |
<bitmap2> | Exclusion BITMAP to be negated |
Returns an integer.
select bitmap_and_not_count(NULL, bitmap_from_string('1,2,3')) banc1, bitmap_and_not_count(bitmap_from_string('1,2,3'), NULL) banc2;
+-------+-------+ | banc1 | banc2 | +-------+-------+ | 0 | 0 | +-------+-------+
select bitmap_and_not_count(bitmap_from_string('1,2,3'), bitmap_from_string('3,4,5')) banc;
+------+ | banc | +------+ | 2 | +------+