您的位置:首页 > 博客中心 > 数据库 >

清空数据库所有表的数据

时间:2022-03-14 03:03

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;

热门排行

今日推荐

热门手游