Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: copy rows from another table ?
Let us say you have two tables as follows:-
table1
SQL> desc table1
Name Null? Type ------------------------------- -------- ---- COLUMN1 NUMBER(10) COLUMN2 VARCHAR2(50)
table1
SQL> desc table1
Name Null? Type ------------------------------- -------- ---- COLUMN1 NUMBER(10) COLUMN2 VARCHAR2(50)
Suppose table1 has data in it, and you want to copy that to table2.
You can use following SQL statement to insert data into table2 from table1:-
insert into table2 select * from table1;
Or
insert into table2 ( column1 , column2 ) select ( column1, column2 ) from from table1;
This is just to give you an idea, you situation may be different but same logic could be applied.
Hope this helps,
Manoj Jain
Oracle Certified Professional - OCP DBA
Chauncey Certified Oracle7 DBA
In article <6tkofv$oqg$1_at_nnrp1.dejanews.com>,
hpcheong_at_ncs.com.sg wrote:
> hello!
>
> just like to know how show i go about copying rows from table1 to table2 ?
>
> note that table2 already exist. what i want it the data.
>
> thanks in advance...
>
> --
> evelyn.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Sep 15 1998 - 02:16:04 CDT