To change any table, to change the data type of a field:
ALTER TABLE <table_name> MODIFY <column_name> <new_datatype>
For example:
To change the data type of any emp_id column from int to varchar, you need:
ALTER TABLE employee MODIFY emp_id varchar(10)
Isn't it easy?
source
share