| Column Addition and Update on Big table [message #284461] |
Thu, 29 November 2007 14:39  |
faiz_hyd
Messages: 294 Registered: February 2006
|
Senior Member |
|
|
hi,
We have to change a column with datatype of NUMBER(4) to NUMBER(6). So we are doing the following so that the current data is ported over:
ALTER TABLE ABC
MODIFY
(
BEG_TIME number(6),
END_TIME number(6)
);
followed by:
UPDATE ABC
SET BEG_TIME = BEG_TIME * 100,
END_TIME = END_TIME * 100;
The second statement would add "00" at the end of the previous four values. However, this table in production has 100 million rows and might take a long time to execute the above statement. Is there a better way to do this?
Thanks
|
|
|
|
|
|
|
|
|
|
|
|