پاک کردن یک سری از جداول از یک اسکیما
set serveroutput on;
set verify off;
declare
sql_str varchar2(1000);
cursor cur_syn is
select owner, table_name
from dba_tables
where owner = 'MIG_ARES_3'
and table_name not in ('T_INV_PRICING_ELEMENT','T_TMS_WEIGHING_STATION');
begin
for rec_syn in cur_syn loop
sql_str := 'DROP TABLE ' || rec_syn.owner || '.' || rec_syn.table_name ||
'CASCADE CONSTRAINTS';
dbms_output.put_line(sql_str);
execute immediate sql_str;
end loop;
end;