Skip to main content

BITMAP_HAS_ALL

Checks if the first bitmap contains all the bits in the second bitmap.

Syntax

BITMAP_HAS_ALL( <bitmap1>, <bitmap2> )

Examples

SELECT BITMAP_HAS_ALL(BUILD_BITMAP([1,4,5]), BUILD_BITMAP([1,2]));

┌───────────────────────────────────────────────────────────────┐
│ bitmap_has_all(build_bitmap([1, 4, 5]), build_bitmap([1, 2]))
├───────────────────────────────────────────────────────────────┤
false
└───────────────────────────────────────────────────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today