What is the length() function in mysql? Isn’t it checking the number of characters: length('Hello') //Return 7
Is there any other function that returns the number of bytes? Please help!
走同样的路,发现不同的人生
length() returns the number of bytes occupied by storage, char_length() returns the number of characters. For example, length('Hello') should return 6 under the utf8 character set, char_length('Hello') should return 2.
length()
char_length()
length('Hello')
char_length('Hello')
length()
returns the number of bytes occupied by storage,char_length()
returns the number of characters.For example,
length('Hello')
should return 6 under the utf8 character set,char_length('Hello')
should return 2.