SQL-J Language Reference
Page 62 of 121

BIT_LENGTH

BIT_LENGTH acts on either a character string expression or a bit string expression and returns the number of bits in the result.

Syntax

BIT_LENGTH ( { CharacterExpression | BitExpression } )

BIT_LENGTH Example

-- returns 32
VALUES BIT_LENGTH('zz')

-- returns 8
VALUES BIT_LENGTH(X'55')

-- returns 3
VALUES BIT_LENGTH(B'111')