Oracle删除当前用户下所有的表的方法1

1、如果有plsql客户端,则可以使用该用户登录,选中所有表 右键Drop即可。

\

2、如果有删除用户的权限,则可以:

1
drop user user_name cascade;

加了cascade就可以把用户连带的数据全部删掉。

--创建用户 create user 用户名 profile default identified by 密码 default tablespace 表空间名称 temporary tablespace TEMP account unlock;
1
2
3
--授权
grant dba to 用户名;
grant connect,resource to 用户名;

3、如果没有删除用户的权限,则可以执行:
select 'drop table '||table_name||';' from cat where table_type='TABLE'

 
 
文章来之:http://i.cnblogs.com/EditPosts.aspx?opt=1
 
posted @ 2015-11-24 14:05  孟宇  阅读(180)  评论(0编辑  收藏  举报