Jeetendra Pujari Jeetendra Pujari - 1 year ago 99
SQL Question

Mysql Add a new value to a column of data type enum

Say I have a mysql table, and I have a column of type

and that column has defined set of values like

How would i add a value of
to this set using alter table statement?

And I want to append the new value to the end of it using

Answer Source

Unfortunately, you need to re-list all the existing enum values when adding a new value to the the enum.

ALTER TABLE mytable MODIFY COLUMN mycolumn ENUM('a','b','c','d','e');

You don't really want to use CONCAT() in this situation.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download