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

Home -> Community -> Usenet -> c.d.o.server -> Re: insert with values and select

Re: insert with values and select

From: Knut Talman <knut.talman_at_mytoys.de>
Date: Thu, 02 May 2002 14:34:58 +0200
Message-ID: <3CD13272.1030601@mytoys.de>


Martin Burkert wrote:

> Hi!
>
> I would like to "copy/modify" some entries from TABLE A to the same table
> TABLE A.
>
> Something like that:
>
> insert into TABLE A (A,B,C,D,E) values ("2", "Martin", select C,D,E from
> Table A where......)
> ^^^^^^^
> new Entries

You can add your new entries to the select statement:

insert into TABLEA (A,B,C,D,E)
select '2','Martin', C, D, E
from TABLEA
where ...;

Keep in mind that this statement will insert as many rows as the query returns.

Hth,

Knut Received on Thu May 02 2002 - 07:34:58 CDT

Original text of this message

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