bit_length
function
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
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for