-
Truncate multiple tables script
I'm having a problem with a truncate script. I want to truncate all tables owned by 'PERFSTAT' (This is a test I want to run before the real thing).
My script:
select 'truncate table ' || owner || '.' || table_name || ' cascade constraints; '
from sys.all_all_tables
where owner in ('PERFSTAT')
IF A RUN A SIMPLE SELECT STATEMENT AFTER THIS EXECUTION, NOTHING WAS TRUNCATED
Please help!
NB:this script was previously used for 'drop table' with success.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|