LENGTH
suggest changeReturn the length of the string in bytes. Some characters use more than one byte. For a character count, use CHAR_LENGTH(). The utf8 example below assumes ö is the two-byte character U+00F6, not a decomposed sequence.
Syntax: LENGTH(str)
LENGTH('foobar') -- 6
LENGTH('fööbar') -- 8 -- contrast with CHAR_LENGTH(...) = 6
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents