![]() |
|
Archives of the TeradataForumMessage Posted: Thu, 01 Oct 2009 @ 13:11:06 GMT
Try something like this...
create table DATABASENAME.TBLNAMEi
(
emp_no integer
,Emp_salary integer
);
Insert into table:
insert into DATABASENAME.TBLNAME values(1, 100); insert into DATABASENAME.TBLNAME
values(2, 200);
Add the additional column in the table:
ALTER TABLE DATABASENAME.TBLNAME
ADD emp_sal_new Decimal(18,0)
sel * from user_work.Ori
Populate the additional column from existing column:
update
DATABASENAME.TBLNAME
set emp_sal_new = emp_salary
And remove the unwanted existing column:
ALTER TABLE DATABASENAME.TBLNAME
DROP emp_salary
Thanks & Regards, C. Murugavel
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||