Created
May 20, 2020 15:06
-
-
Save akhsiM/2a2a16fbe74ce479a8ad05165d798443 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Clear all temp tables in your space | |
undef current_schema; | |
begin | |
for cur_cleanup in ( | |
select object_name | |
,object_type | |
from user_objects | |
where object_type = 'TABLE' | |
and temporary = 'Y' | |
) | |
loop | |
begin | |
execute immediate 'truncate '|| cur_cleanup.object_type|| ' "'|| | |
cur_cleanup.object_name|| '" drop storage'; | |
execute immediate 'drop '|| cur_cleanup.object_type|| ' "'|| | |
cur_cleanup.object_name|| '" cascade constraints'; | |
end; | |
end loop; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment