LENGTH() CHAR_LENGTH()

Posted rsapaper

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LENGTH() CHAR_LENGTH()相关的知识,希望对你有一定的参考价值。

http://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_length

LENGTH(str)

Returns the length of the string str, measured in bytes. A multibyte character counts as multiple bytes. This means that for a string containing five 2-byte characters, LENGTH() returns 10, whereas CHAR_LENGTH() returns 5.

 

CHAR_LENGTH(str)

Returns the length of the string str, measured in characters. A multibyte character counts as a single character. This means that for a string containing five 2-byte characters, LENGTH() returns 10, whereas CHAR_LENGTH() returns 5.

以上是关于LENGTH() CHAR_LENGTH()的主要内容,如果未能解决你的问题,请参考以下文章

LENGTH() CHAR_LENGTH()

mysql length和char_length

Mysql如何查字段的长度,Mysql中length()char_length()的区别

Python爬虫数据应该怎么处理

字符串函数

Python爬虫数据处理