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

来源:互联网 发布:北大青鸟java培训课程 编辑:程序博客网 时间:2024/05/17 01:40

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

\

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

?
1
dropuser user_name cascade;

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

--创建用户 create user 用户名 profile default identified by 密码 default tablespace 表空间名称 temporary tablespace TEMP account unlock;
?
1
2
3
--授权
grantdba to用户名;
grantconnect,resourceto用户名;

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

0 0
原创粉丝点击