I have a table named "cities" which have thousands of records with only two fields namely city and state. Though the type and length of the both fields defined as varchar(100) in my table, I am sure no values in the columns took up 100 characters. I want to write a query to know which value of the state column takes the heighest numbers of characters. I tried with:
select distinct max(state) from cities;
I know this is not the query what I want. Is there any SQL function to accomplish this task?