SELECT * FROM table ORDER BY string_length(column);
Is there a MySQL function to do this (of course instead of string_length)?
string_length
You are looking for CHAR_LENGTH() to get the number of characters in a string.
CHAR_LENGTH()
For multi-byte charsets LENGTH() will give you the number of bytes the string occupies, while CHAR_LENGTH() will return the number of characters.
LENGTH()
1.4m articles
1.4m replys
5 comments
57.0k users