Re: truncate tables in my tablespace

From: Arun Mathur <themathurs_at_gmail.com>
Date: Thu, 17 Jan 2008 13:14:23 -0800 (PST)
Message-ID: <3b7a495d-532a-42fd-8355-b13ea764b6c8@d21g2000prf.googlegroups.com>


On Jan 17, 1:50 pm, burrell.j..._at_yahoo.com wrote:
> Hello,
> I want to delete all the data in all the tables in my tablespace.
> SQL> select table_name from user_tables;
> I can get a list of the tables but I dont want to a
> for each table type in
> SQL> delete from tablename;
> Is there a smart way of doing this?
>
> TIA
> J

Assuming the tables in your tablespace are stored under one database account, how about:

  1. Export the schema via the exp utility where rows=N
  2. Drop the user (Ensure you have a backup)
  3. Recreate the user
  4. Import the .dmp file from Step 1

Regards,
Arun Received on Thu Jan 17 2008 - 15:14:23 CST

Original text of this message