Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to Move data between tables (newbie question)

Re: How to Move data between tables (newbie question)

From: OraSaurus <granaman_at_not_home.com>
Date: Fri, 25 Jun 1999 03:31:40 GMT
Message-ID: <wKCc3.1153$4p2.1162@news.rdc1.ne.home.com>


In article <7ktf6p$78f$1_at_nnrp1.deja.com>, hedo_ii_rat_at_my-deja.com wrote:
>I have just moved out of Transact SQL on Sybase
>to PL/SQL on Oracle. I am having a difficult
>time finding a simple way to copy the data from
>one table to another. In Sybase, we had a SELECT
>INTO statement that let us pick which columns
>from one table we wanted to copy to another. I
>know SELECT ... INTO ... in Oracle is not the
>same, however, isn't there an easier way to do
>this than declaring a hundred variables,
>selecting into them, then inserting them into
>another table on a row by row basis with a loop?
[...]

insert into table1 (column_1, column_2, ..., column_n) select col1, col2, ..., coln

   from table2
 where ...
/

Received on Thu Jun 24 1999 - 22:31:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US