Re: truncate tables in my tablespace

From: loosethisskin <loosethisskin_at_gmail.com>
Date: Thu, 17 Jan 2008 16:54:28 -0800 (PST)
Message-ID: <0b6d1c49-ba9f-465e-8439-678f3abcf2f4@d70g2000hsb.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

begin
  for t in (select table_name from user_tables)   loop
    execute immediate('truncate table ' || t.table_name);   end loop;
end;
/ Received on Thu Jan 17 2008 - 18:54:28 CST

Original text of this message