oracle怎么删除用户下所有表?
时间:2020-09-30 09:50
方法:1、使用“drop user user_name cascade;”语句;2、使用“select 'drop table '||table_name||';' from cat where table_type='TABLE'”语句。 ORACLE删除当前用户下所有的表的方法 1、如果有删除用户的权限,则可以: 加了cascade就可以把用户连带的数据全部删掉。 删除后再创建该用户。 --创建管理员用户 --授权 --修改限额 --查看所有用户对象 2、如果没有删除用户的权限,则可以执行: 将会输出一批删除表的sql语句,这些SQL语句执行一下就可以了。(需要有drop table的权限) 推荐教程:《Oracle教程》 以上就是oracle怎么删除用户下所有表?的详细内容,更多请关注gxlsystem.com其它相关文章!drop user user_name cascade;
create user 用户名 identified by 密码 default tablespace space_data(表空间名称) temporary tablespace space_temp(临时表空间名称);
grant connect,dba to 用户名;
ALTER USER "用户名" QUOTA UNLIMITED ON SPACE_DATA(表空间名称);
select uo.object_name,uo.object_type from user_objects uo where uo.object_type<>'LOB' order by uo.object_type desc
select 'drop table '||table_name||';'
from cat
where table_type='TABLE'