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: why cannot truncate???

Re: why cannot truncate???

From: BobH <b-horton_at_worldnet.att.net>
Date: 1998/03/25
Message-ID: <6fch54$pjh@bgtnsc03.worldnet.att.net>#1/1

mzawadzki_at_starnet.lenfest.com wrote:
>
> Is there another table whic references this one ? if so,
> truncate/delete it first.
> cscwt95_at_engsvr.ust.hk (Chan Wai Tong) wrote:
>
> >I am using oracle 7.1.6.
> >I want to import data to a table.
> >Before I import data, I would like to truncate the table first.
> >I login sqlplus and submit the following SQL.
 

> >SQL> truncate table me.mytable;
 

> >But no response for a long ... long time.
> >Then I try to delete all records from the table.
> >I can delete records successfully.
 

> >Could anyone tell me the reason??
 

> >The table is not a cluster table.
 

> >Thank you very much.
 

> >Mike CHAN
>
> Mark Zawadzki, late of Waynesboro, Va.
> '...there is not a sprig of grass that shoots uninteresting to me.'
> Thomas Jefferson, 1790.

I disable all keys on the table and drop indexes first. Then enable after the re-load.
 One note though on truncate.
On truncate,storage will also be dropped.If your table was created with specific storage allocation, tablespace_name etc. add 'REUSE STORAGE' to your truncate command to keep the table's current allocation. Otherwise it will use the system defaults which may not be what you want.

bobh Received on Wed Mar 25 1998 - 00:00:00 CST

Original text of this message

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