tags:

views:

201

answers:

2
SELECT * FROM table ORDER BY string_length(column);

is there a mysql function to do this (of course instead of "string_length")?

thank you!

+2  A: 

You are looking for LENGTH()

hsz
wow that's pretty simple. thank you!
sombe
A: 
select * from table order by length(column);

Documentation on the length() function, as well as all the other string functions, is available here.

Kaleb Brasee