If I say:
select max(length(Name)) from my_table
I get the result as 18, but I want the concerned data also. So if I say:
s
In case you need both max and min from same table:
select * from ( (select city, length(city) as maxlen from station order by maxlen desc limit 1) union (select city, length(city) as minlen from station order by minlen,city limit 1))a;