Skip to main content

BIT_LENGTH

Return the length of a string in bits.

Syntax

BIT_LENGTH(<expr>)

Arguments

ArgumentsDescription
<expr>The string.

Return Type

BIGINT

Examples

SELECT BIT_LENGTH('Word');
+----------------------------+
| SELECT BIT_LENGTH('Word'); |
+----------------------------+
| 32 |
+----------------------------+
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