MySQL Forums
Forum List  »  Newbie

Add one new column and populate?
Posted by: Gordon Royle
Date: May 17, 2005 01:20AM

I have a mySQL table with about 12 million rows. Suppose I now compute one extra piece of data (a small integer) for each row, thus creating a file containing 12 million additional values that I wish to incorporate into my table. I know how to add an extra column to the table (ALTER) but I just cannot figure out how to populate the new column with the additional data WITHOUT deleting the old data? I guess that I can write 12 million UPDATE statements, but this seems pretty horrible.

Any clues much appreciated.

Gordon

Options: ReplyQuote


Subject
Written By
Posted
Add one new column and populate?
May 17, 2005 01:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.