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: Dump records to a file

Re: Dump records to a file

From: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Mon, 10 Jan 2005 21:30:20 +0100
Message-ID: <9cp5u0ls9medal3n3of8v23k9clrvprgbk@4ax.com>


On 10 Jan 2005 11:53:26 -0800, hystable_at_yahoo.com wrote:

>Can anyone tell me how to dump records to a file and then load that
>file back into the table? I need to delete about 99% of the records in
>a table. I figured I could dump the records I want to keep to a file,
>truncate the table and then load the table again via the file. Or is
>there a better way to do it?
>
>Thanks.

If it is only 1 percent

create table bla as
select * from foo
where <records to be retained>
/

truncate table foo
/
insert into foo select * from bla

should do equally well.

--
Sybrand Bakker, Senior Oracle DBA
Received on Mon Jan 10 2005 - 14:30:20 CST

Original text of this message

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