# **BIT_LENGTH()**

## **Function Description**

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

## **Grammar Description**

```text
> BIT_LENGTH(str)
```

## **Parameter definition**

| Parameters | Description |
| ---- | ---- |
| str | Required parameter, string to calculate length |

## **Example**

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