Categories: Binary
BIT_LENGTH
Returns the length of the bits of the input expression.
Syntax
BIT_LENGTH(expression binary, varchar) → integer
- expression: A binary or varchar expression.
Examples
BIT_LENGTH exampleSELECT BIT_LENGTH(1010)
-- 32
SELECT BIT_LENGTH('DREMIO')
-- 48
SELECT BIT_LENGTH('abc')
-- 24
SELECT BIT_LENGTH(NULL)
-- null