删表就是drop命令. 如果你要大量删除表,只保留其中几张表,可以用exp命令将需要保留的表导出,然后用sys用户以DBA身份登录数据库drop掉那个用户,就可以把所有表都删除.之后,再建立刚才drop的用户,再将之前exp导出的表imp导进刚才的用户就可以了.
①.、创建两个测试表,指定表空间TEMP;
create table test_ts_1(id number) tablespace temp;
select * from user_tables t where tablespace_name = 'TEMP';
begin
for v_cur in (select distinct t.table_name from user_tables t where tablespace_name = 'TEMP') loop
execute immediate 'drop table '||v_cur.table_name||' purge';
end loop;
end;
select * from user_tables t where tablespace_name = 'TEMP'
以上就是土嘎嘎小编为大家整理的如何删除oracle表相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!