I am trying to optimize my database. In order to do so, I need to be able to determine the longest data entry in a varchar column, and then trim the column definition to just a
The back ticks and the char_length function in Aurelio's answer both cause errors. This answer works.