I have a table with one of the columns is of type varchar(city). and want to find the longest and shortest of values stored in that column.
select a.city, a.city
In MySQL
(select city, LENGTH(city) cityLength from station order by cityLength desc,city asc LIMIT 1) union all (select city, LENGTH(city) cityLength from station order by cityLength asc,city asc LIMIT 1)