lets say i have a table like this:
create table tbl_name (
the_column enum('a','b','c')
);
and now i want to change that enum to have possible values ('d','e','f'), and i want to maintain the current data and mane a->d, b->e, c->f.
of course i could write a program to do this... alter the table, add the options, change the options, remove the old options... but i have to do this about 100 times.
i'm using the latest build of mysql with myisam tables.
i'm hoping for something like:
ALTER TABLE tbl_name CHANGE COLUMN the_column the_column enum('d','e','f') MAINTAIN INDEXES
or something similar.
thanks.
create table tbl_name (
the_column enum('a','b','c')
);
and now i want to change that enum to have possible values ('d','e','f'), and i want to maintain the current data and mane a->d, b->e, c->f.
of course i could write a program to do this... alter the table, add the options, change the options, remove the old options... but i have to do this about 100 times.
i'm using the latest build of mysql with myisam tables.
i'm hoping for something like:
ALTER TABLE tbl_name CHANGE COLUMN the_column the_column enum('d','e','f') MAINTAIN INDEXES
or something similar.
thanks.