set linesize 80;
set pagesize 10000;
set long 50;
set echo on;

/* ************************************************ */
/*                                                  */
/* script to perform the select count(*) from all   */
/*   tables under all schemas                       */
/*                                                  */
/*         @c:\oracle\sql\bld_trun.sql              */ 
/*                                                  */
/* ************************************************ */

set echo off;

select 'TRUNCATE TABLE '||owner||'.'||table_name||';'
from all_tables
where owner = upper('&&schema')
ORDER BY owner, table_name;

spool trun_all.sql
/
spool off;
undefine schema;
commit;
