Xref: alice comp.databases.oracle.server:28997
Path: alice!news-feed.fnsi.net!newspump.monmouth.com!newspeer.monmouth.com!nntp2.dejanews.com!nnrp1.dejanews.com!not-for-mail
From: mjain@my-dejanews.com
Newsgroups: comp.databases.oracle.server
Subject: Re: copy rows from another table ?
Date: Tue, 15 Sep 1998 07:16:04 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 58
Message-ID: <6tl47l$5g0$1@nnrp1.dejanews.com>
References: <6tkofv$oqg$1@nnrp1.dejanews.com>
To: hpcheong@ncs.com.sg
X-Article-Creation-Date: Tue Sep 15 07:16:04 1998 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
X-Http-Proxy: 1.1 x3.dejanews.com:80 (Squid/1.1.22) for client 153.37.200.230

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@nnrp1.dejanews.com>,
  hpcheong@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
