MySql, is there a way to convert Integer field into Varchar without losing data?

integer, mysql, schema, varchar

Solution

try this to alter the schema:

alter table table_name change col_name col_name varchar(10)

Problem

I would like to change a table's schema so that one Integer field changes to Varchar one, but keep the data (previous numbers will now be strings).

Original source