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
Ok, I am not sure what are you using(MySQL, SLQ Server, Oracle, MS Access..) But you can try the code below. It work in W3School example DB. Here try this:
SELECT city, max(length(city)) FROM Customers;