declare sqlstr varchar2(999); begin for c in (select table_name from user_tables) loop sqlstr := 'drop table '||c.tablename||' purge'; begin execute immediate sqlstr ; exception when others then dbms_output.put_line(c.tablename||'可能具有外键关联,自行确定是否删除'); end; end loop; end;
declare sqlstr varchar2(999); begin for c in (select table_name from user_tables) loop sqlstr := 'drop table '||c.table_name||' purge'; begin execute immediate sqlstr ; exception when others then dbms_output.put_line(c.table_name||'可能具有外键关联,自行确定是否删除'); end; end loop; end;
declare sqlstr varchar2(999); begin for c in (select table_name from user_tables) loop sqlstr := 'drop table '||c.table_name||' purge'; begin execute immediate sqlstr ; exception when others then dbms_output.put_line(c.table_name||'可能具有外键关联,自行确定是否删除'); end; end loop; end;
truncate table tablename 然后 insert into select * from
sqlstr varchar2(999);
begin
for c in (select table_name from user_tables) loop
sqlstr := 'drop table '||c.tablename||' purge';
begin
execute immediate sqlstr ;
exception
when others then
dbms_output.put_line(c.tablename||'可能具有外键关联,自行确定是否删除');
end;
end loop;
end;
sqlstr varchar2(999);
begin
for c in (select table_name from user_tables) loop
sqlstr := 'drop table '||c.table_name||' purge';
begin
execute immediate sqlstr ;
exception
when others then
dbms_output.put_line(c.table_name||'可能具有外键关联,自行确定是否删除');
end;
end loop;
end;
sqlstr varchar2(999);
begin
for c in (select table_name from user_tables) loop
sqlstr := 'drop table '||c.table_name||' purge';
begin
execute immediate sqlstr ;
exception
when others then
dbms_output.put_line(c.table_name||'可能具有外键关联,自行确定是否删除');
end;
end loop;
end;
truncate table tablename 然后 insert into select * from