LENGTH(str): Returns the length of the string str, measured in bytes : LENGTH « String Functions « MySQL Tutorial






For a string containing five two-byte characters, LENGTH() returns 10, whereas CHAR_LENGTH() returns 5.

OCTET_LENGTH() is a synonym for LENGTH().

SELECT LENGTH('text');


mysql>








23.20.LENGTH
23.20.1.LENGTH(str): Returns the length of the string str, measured in bytes
23.20.2.Getting the LENGTH of the first name