📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

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 | +----------------------------+

Was this page helpful?