| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: partitioned data
"Cupofjava1961" <cupofjava1961_at_aol.com> wrote in message
news:20040328164400.01536.00000287_at_mb-m15.aol.com...
> I need some help with the following command:
>
> alter table sales_detail_data exchange partition sales_q1_99
>
> with table sales_quarter_99 excluding indexes;
>
> My question is am I moving data from the partition sales_q1_99
> into the table sales_quarter_99
> or
> am I moving the data in the table sales_quarter_99
> into the partition sales_q1_99 ?
> In which direction does this command work?
>
> Thanks in advance.
Hi,
The answer is that data is moved in both directions. The data in the partition will end up in the table and the data in the table will end up in the partition. See p.11-81 of "Oracle 9i SQL Reference" for details. See p.11-95 for an example.
See also "regular table to partition table" at http://asktom.oracle.com/pls/ask/f?p=4950:8:3455899164043960561::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:5532451667350, This example shows how to create an empty partition, and exchange that partition with a table of new data as a 'quick' way of adding new data to a partitioned table. In effect, this example move data in one direction only.
Douglas Hawthorne Received on Sun Mar 28 2004 - 16:47:20 CST
![]() |
![]() |