Sort by String Length
sql
1SELECT name FROM students
2ORDER BY LENGTH(name);Shortest names first.
Descending
sql
1SELECT name FROM students
2ORDER BY LENGTH(name) DESC;
1SELECT name FROM students
2ORDER BY LENGTH(name);Shortest names first.
1SELECT name FROM students
2ORDER BY LENGTH(name) DESC;