RE: How to truncate all the tables in a schema in one shot?

RE: How to truncate all the tables in a schema in one shot?

 

  

Hi,

-- run this script in the schema you wish to truncate the tables
Set header off
Spool trunc_schema.sql
select 'truncate table '||tname||';' from tab where tabtype = 'TABLE';
Spool off

-- then run the generated script
@trunc_schema.sql


Bas
-----Oorspronkelijk bericht-----
Van: Ranganath H M
[mailto:oracledba-ezmlmshield-x30718484.[Email address protected]
Verzonden: woensdag 5 juli 2006 14:54
Aan: LazyDBA Discussion
Onderwerp: 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


Oracle LazyDBA home page