LENGTH

suggest change

Return 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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents