Advertisement
m4rzus

Untitled

Apr 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. begin
  2. for iRec in
  3. (select distinct OBJECT_TYPE, OBJECT_NAME,
  4. 'drop '||OBJECT_TYPE||' "'||OBJECT_NAME||'"'||
  5. case OBJECT_TYPE when 'TABLE' then ' cascade constraints purge' else ' ' end as PRIKAZ
  6. from USER_OBJECTS where OBJECT_NAME not in ('SMAZ_VSECHNY_TABULKY', 'VYPNI_CIZI_KLICE', 'ZAPNI_CIZI_KLICE', 'VYMAZ_DATA_VSECH_TABULEK')
  7. ) loop
  8. begin
  9. dbms_output.put_line('Prikaz: '||irec.prikaz);
  10. execute immediate iRec.prikaz;
  11. exception
  12. when others then dbms_output.put_line('NEPOVEDLO SE!');
  13. end;
  14. end loop;
  15. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement