Re: alter only an enum label

2005-06-17 Thread Jake Peavy
On 6/16/05, Gabriel B. <[EMAIL PROTECTED]> wrote: > If i have a table with about 800M records. and one of the fields is a > enum("a", "b", "c") and i want to change it to enum("a","b","x") My understanding (such as it is) is that the best way to do this is to add a second column with enum('a','b

RE: alter only an enum label

2005-06-16 Thread Gordon Bruce
n may just be faster than the ALTER TABLE on the fully populated table. -Original Message- From: Gabriel B. [mailto:[EMAIL PROTECTED] Sent: Thursday, June 16, 2005 1:18 PM To: mysql@lists.mysql.com Subject: Re: alter only an enum label hum... clever. i liked that solution. but do have ex

Re: alter only an enum label

2005-06-16 Thread Gabriel B.
hum... clever. i liked that solution. but do have experience on how long it will take with milions of records? all records havin only a int(11) as unique key and the enum field.. suposing now i have enum("a", "b") only, and did a "ALTER TABLE tablename CHANGE columnname columnname ENUM('a','b','c

RE: alter only an enum label

2005-06-16 Thread Gordon Bruce
If you have "c" values in the table currently you can just do an ALTER TABLE tablename CHANGE columnname columnname ENUM('a','b','c','x') DEFAULT "a" NOT NULL then UPDATE tablename SET columname = 'x' WHERE columname = 'c' Then ALTER TABLE tablename CHANGE columnname columnname ENUM('a','b',