Skip to content

BIT_LENGTH()

Function Description

Returns the length of the string str, in bit. If str is NULL, return NULL.

Grammar Description

> BIT_LENGTH(str)

Parameter definition

Parameters Description
str Required parameter, string to calculate length

Example

> SELECT BIT_LENGTH('text');
+------------------------+
| bit_length(text) |
+------------------------+
| 32 |
+------------------------+
1 row in set (0.00 sec)