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
length(CITY) will return the length of the string,
https://www.w3schools.com/sql/func_mysql_length.asp
(select CITY, length(CITY) from STATION order by length(CITY),CITY limit 1) UNION (select CITY, length(CITY) from STATION order by length(CITY) DESC limit 1);