bitmap_not

description

Syntax

BITMAP BITMAP_NOT(BITMAP lhs, BITMAP rhs)

Calculate the set after lhs minus rhs, return the new bitmap.

example

  1. mysql> select bitmap_to_string(bitmap_not(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4')));
  2. +----------------------------------------------------------------------------------------+
  3. | bitmap_to_string(bitmap_not(bitmap_from_string('2,3'), bitmap_from_string('1,2,3,4'))) |
  4. +----------------------------------------------------------------------------------------+
  5. | |
  6. +----------------------------------------------------------------------------------------+
  7. mysql> select bitmap_to_string(bitmap_not(bitmap_from_string('2,3,5'),bitmap_from_string('1,2,3,4')));
  8. +------------------------------------------------------------------------------------------+
  9. | bitmap_to_string(bitmap_not(bitmap_from_string('2,3,5'), bitmap_from_string('1,2,3,4'))) |
  10. +------------------------------------------------------------------------------------------+
  11. | 5 |
  12. +------------------------------------------------------------------------------------------+

keywords

  1. BITMAP_NOT,BITMAP