Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Copying Data from one column into another

691754Jan 7 2011 — edited Jan 7 2011
Hi,
I have a table which has 4 columns,

Table A
Col1
Col2
Col3
Col4

What I need to do is to alter table A and add a new Column Col4_Temp and then copy all values from col4 into Col4_Temp and then copy Col2 values into Col4.

I used the below command to alter my table, In the same sacipt file I need to add copy functionality. How will I copy the values?

ALTER TABLE
A
ADD
(
Col4_Temp VARCHAR2(3 CHAR)

);


Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2011
Added on Jan 7 2011
5 comments
15,028 views