oracle删除当前用户所有表

 

DECLARE cursor tab_cur is select 'drop table '||table_name from user_tables;

tab_row varchar2(100);

BEGIN

open tab_cur;

--while tab_cur%FOUND

LOOP

fetch tab_cur into tab_row;

EXIT WHEN tab_cur%NOTFOUND;

  execute immediate tab_row;

end loop;

close tab_cur;

end;

你可能感兴趣的:(oracle)