I have a SET field which hit the limit of 64 (I was a newbie while I was designing the database few years ago). Now I cannot add more SET values to my department field. I'm thinking to change it into ENUM type. What can I do?

MySQL 5.0.95

有帮助吗?

解决方案

alter table `table_name` change column_name new_column_name enum('a','b','c','d');

new column name can be the same as old. values probably should be the same, or at least there should be every old value from set type and some new that you want to add.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top