bit_length

description

Syntax

INT bit_length(VARCHAR str)

返回字符串的位长度。

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