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: Duplicate all rows in a table

Re: Duplicate all rows in a table

From: Bronke, Nicolas <newsgroup_at_trinity.de>
Date: Sun, 19 Mar 2000 15:34:34 +0100
Message-ID: <38d4fb31_1@news2.prserv.net>


> I want to duplicate all rows in a table.
> The primary key should start with
> a suffix like "dup_".
> Is there an easier way than export, find and
> replace,import?
>

Several ways:
uses for physical duplication

insert into <tablename> select [<columns>] from <tablename>

or for dynamic

create view xx
as
select * from <tablename>
union all
select * from <tablename>

Regards
Nicolas Received on Sun Mar 19 2000 - 08:34:34 CST

Original text of this message

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