begin for v in ( select distinct schema_name from %user.DROP_MISC_OBJECTS ) loop begin execute immediate 'drop user ' || v.schema_name || ' cascade'; exception when others then null; end; end loop; execute immediate 'drop table %user.DROP_MISC_OBJECTS'; exception when others then null; end; / commit;