Oracle删除当前用户下所有表数据

declare
 cursor cur is select table_name from user_tables;
 currow cur%rowtype;
 str varchar(2000);
 
 begin
   for currow in cur loop
     str:='truncate table '||currow.table_name;
     execute immediate str;
     dbms_output.put_line(str);
     end loop;
     end;
     

 

posted @ 2015-10-09 17:49  石中隐鱼  阅读(560)  评论(0编辑  收藏  举报