BITMAP_REMOVE
Descriptionβ
Removes a specified value from a Bitmap column.
Syntaxβ
BITMAP_REMOVE(<bitmap>, <value>)
Parametersβ
Parameter | Description |
---|---|
<bitmap> | The Bitmap value |
<value> | The value to remove |
Return Valueβ
Returns the Bitmap after removing the specified value.
Returns the original Bitmap if the value to be removed does not exist;
Returns NULL
if the value to be removed is NULL
.
Examplesβ
To remove a value from a Bitmap:
select bitmap_to_string(bitmap_remove(bitmap_from_string('1, 2, 3'), 3)) res;
The result will be:
+------+
| res |
+------+
| 1,2 |
+------+
To remove a NULL
value from a Bitmap:
select bitmap_to_string(bitmap_remove(bitmap_from_string('1, 2, 3'), null)) res;
The result will be:
+------+
| res |
+------+
| NULL |
+------+