How to convert a column of type TEXT to VARCHAR?

mysql

Solution

Yes for sure

`ALTER TABLE table_name MODIFY column_name VARCHAR(X)`

Problem

Is there a way to convert a column with data in it as `TEXT` to `VARCHAR(X)` easily? There are no existing records in the column is longer than `X`.

Original source