-- Created on 2013-2-6 by ADMINISTRATOR
declare
-- Local variables here
tname varchar2(2000) ;
cursor cur is select table_name from user_tables;
begin
for tbname in cur loop
begin
tname:='drop table '||tbname.table_name;
execute immediate tname;
end;
end loop;
end;
存储过程版
create or replace procedure pro_droptable is
cursor cur is select table_name from user_tables;
drop_sql varchar2(1000);
begin
for tbname in cur loop
begin
drop_sql:='drop table '||tbname.table_name;
execute immediate drop_sql;
end;
end loop;
end pro_droptable;
然后执行就OK啦
执行语句:call pro_droptable()