Archives of the TeradataForum
Message Posted: Thu, 01 Oct 2009 @ 13:31:25 GMT
Subj: | | Re: Modfy data type in a table |
|
From: | | Rob Paller |
Another approach instead of replacing the table:
ALTER TABLE SMART_APP.TEMP ADD EMP_SALARY1 DECIMAL(18,0);
UPDATE SMART_APP.TEMP
SET EMP_SALARY1 = EMP_SALARY;
ALTER TABLE TEMP DROP EMP_SALARY;
ALTER TABLE TEMP RENAME EMP_SALARY1 AS EMP_SALARY;
Granted, this approach will not approach the efficiency of a INSERT...SELECT into a new table (non-logged transaction), but if you are
constrained by space this may be suitable.
Hope this helps.
|