begin
for i in (select t.table_name from user_tables t
where t.table_name like '%关键字%') loop
begin
execute immediate 'delete table ' || i.table_name;
commit;
EXCEPTION
when OTHERS then
DBMS_OUTPUT.PUT_LINE(i.table_name);
end;
end loop;
end;
遇到清空有问题的,大都是建立了索引的表。没有进行索引的重建,直接跳过了。
清空表里的数据
最新推荐文章于 2021-12-17 17:32:24 发布