Re: truncate tables in my tablespace
Date: Thu, 17 Jan 2008 13:05:51 -0800 (PST)
On Jan 17, 12:50 pm, burrell.j..._at_yahoo.com wrote:
> 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?
Use a script to write a script:
-- select 'truncate table ' || table_name || ';' from user_tables; -- spool off Of course, you'll also want to set some things in sqlplus to supress column headers, page breaks, etc. so that doit.sql is a clean, executable sql script -- or just manually clean it up before executing it.Received on Thu Jan 17 2008 - 15:05:51 CST