Using ALTER TABLE to add enumeration values โโin order is described in the MySQL documentation .
However, to remove enumeration values, the best option is to create a new column to modify.
ALTER TABLE your_table ADD new_action_column ENUM('act1', 'act2') ... ; UPDATE your_table SET new_action_column = action; ALTER TABLE your_table DROP action; ALTER TABLE your_table CHANGE new_action_column action ENUM('act1', 'act2') ... ;
Edit
By the way. Using ENUM is not a good idea, you should use INT instead.
8 Reasons MySQL ENUM Data Type Is Evil
I suggest you use matching, for example
+------+-----+ | ENUM | INT | +======+=====+ | act1 | 0 | +------+-----+ | act2 | 1 | +------+-----+
Florian parain
source share