清空数据库所有表的数据

declare cursor c_t is select table_name from user_tables;
table_name user_tables.table_name%type;
begin open c_t;
loop fetch c_t into table_name;
exit when c_t%notfound;
execute immediate 'delete from ' || table_name;
end loop;
close c_t;
end;

posted on 2014-11-27 09:12  可爱2014  阅读(164)  评论(0编辑  收藏  举报

导航