spool a.sql;
select 'truncate table '||table_name||';' from user_tables;
spool off;
Edit a.sql for unwanted rows and run this from sqlprompt.
SQL> a.sql
It will truncate all your table in current schema.
Thanks and Best Regards,
Avneesh Kumar Rathor
BT - CSCS
t: +44 20 7492 8442
m: +44 77 2089 9130
"Ranganath H M " <oracledba-ezmlmshield-x30718484.[Email address protected]
5 July 2006 18:24 ZE5B
To
"LazyDBA Discussion" <[Email address protected]
cc
Subject
How to truncate all the tables in a schema in one shot?
Hi,
How to truncate all the tables in a schema in one shot.
Thanks,
Ringa
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:
http://www.lazydba.com/legal.html
Whilst this email has been checked for all known viruses, recipients should undertake their own virus checking as Xansa will not accept any liability whatsoever.
This email and any files transmitted with it are confidential and protected by client privilege. It is solely for the use of the intended recipient.
Please delete it and notify the sender if you have received it in
error. Unauthorised use is prohibited.
Any opinions expressed in this email are those of the individual and not
necessarily the organisation.
Xansa, Registered Office: 420 Thames Valley Park Drive,
Thames Valley Park, Reading, RG6 1PU, UK.
Registered in England No.1000954.
t +44 (0)8702 416181
w www.xansa.com
Oracle LazyDBA home page