BIT_LENGTH()

Description

Returns the length of the string str in bits. Returns NULL if str is NULL.

Syntax

  1. > BIT_LENGTH(str)

Arguments

ArgumentsDescription
strRequired. String you want to calculate.

Examples

  1. > SELECT BIT_LENGTH('text');
  2. +------------------+
  3. | bit_length(text) |
  4. +------------------+
  5. | 32 |
  6. +------------------+
  7. 1 row in set (0.00 sec)