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!

How To Replace the column data of one table to another table

947624Aug 1 2012 — edited Aug 3 2012
Currently I'm Using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production.

My Sample Data is,

create table emp1(ename varchar2(20),deptno number);

create table emp2(ename varchar2(20),deptno number);

emp1 Table Data:
------------------------

ename deptno
--------- ----------
Surendra 120
Chandra 180
Ram 190
Raj 170

emp2Table Sample Data:
---------------------------------

ename deptno
--------- ----------
xx 121
yy 181
zz 191
hh 171

So, My requirement is ,

How to repalce the ename data of emp1 table into ename of emp2 table .

My Requred OutPut like:

select * from emp2;

ename deptno
--------- ----------
Surendra 121
Chandra 181
Ram 191
Raj 171



Note:-This is Only Sample data, Actually ,my table haiving more than 1mollions of records.So Performence wise the Query Or Procedure sholud be good.

Please Help me on this !!

Thanks in Adv!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2012
Added on Aug 1 2012
32 comments
3,808 views