Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Databricks SQL
Databricks Runtime
Returns the bit length of string data or number of bits of binary data.
Syntax
bit_length(expr)
Arguments
expr
: An BINARY or STRING expression.
Returns
An INTEGER.
Examples
> SELECT bit_length('Spark SQL');
72
> SELECT bit_length('北京');
48