bit_length

Description

Syntax

INT bit_length (VARCHAR str)

Return length of argument in bits。

example

  1. mysql> select bit_length("abc");
  2. +-------------------+
  3. | bit_length('abc') |
  4. +-------------------+
  5. | 24 |
  6. +-------------------+
  7. mysql> select bit_length("中国");
  8. +----------------------+
  9. | bit_length('中国') |
  10. +----------------------+
  11. | 48 |
  12. +----------------------+

keyword

BIT_LENGTH