Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to make a quick copy ?
On Feb 27, 3:09 am, "Frank van Bortel" <frank.van.bor..._at_gmail.com>
wrote:
> On 27 feb, 05:28, "Peter Keckeis" <no_spam_peter.keck..._at_11er.at>
> wrote:
>
>
>
>
>
> > Hi all,
>
> > what do you suggest to copy about 2000000 rows from table_a to table_b,
> > where both have the same column definitions?
>
> > Oracle 10g
>
> > Is this a possible solution?
> > SQL> CREATE TABLE table_b AS (SELECT * FROM table_a);
>
> > or how can i, after exporting table_a with the EXP utility,
> > import the data into the new table_b?
>
> > or do you have a better way?
>
> > Thanks for any suggestions
> > Peter Keckeis
>
> The imp/exp solution does not support changes in table name, only
> to a different user, so that won't be a solution.
> CTAS (Create Table As Select) would be your best (and fastest)
> solution.- Hide quoted text -
>
> - Show quoted text -
As Frank suggested CTAS is a good way to go. You do have the option also of splitting the DDL step (create table) from the DML step (insert rows) if desired via insert select.
HTH -- Mark D Powell -- Received on Tue Feb 27 2007 - 09:57:07 CST