Oracle中drop user和drop user cascade的区别
drop user ; 仅仅是删除用户,drop user username cascade ;会删除此用户名下的所有表和视图。
user
Specify the user to be dropped. Oracle Database does not drop users whose schemas contain objects unless you specify CASCADE or unless you first explicitly drop the user's objects.
CASCADE
Specify CASCADE to drop all objects in the user's schema before dropping the user. You must specify this clause to drop a user whose schema contains any objects.
使用cascade参数可以删除该用户的全部objects。要说明的如下:
1. If the user's schema contains tables, then Oracle Database drops the tables and automatically drops any referential integrity constraints on tables in other schemas
that refer to primary and unique keys on these tables.
如果用户的schema中有表,则在删除表的时候自动删除与该表相关的主键和外键。
2. If this clause results in tables being dropped, then the database also drops all domain indexes created on columns of those tables and invokes appropriate drop
routines.
如果用户的schema中有表,则在删除表的时候自动删除与该表相关的索引。
3. Oracle Database invalidates, but does not drop, the following objects in other schemas:
删除用户时,下列在其他用户中的objects不会被删除,只会被置为无效
Views or synonyms for objects in the dropped user's schema
视图,同义词
Stored procedures, functions, or packages that query objects in the dropped user's schema
存储过程,函数,包
Oracle Database does not drop materialized views in other schemas that are based on tables in the dropped user's schema. However, because the base tables no longer exist, the materialized views in the other schemas can no longer be refreshed.
其他用户建立的基于被删除用户的物化视图不会被删除,只是不能在刷新了。
Oracle Database drops all triggers in the user's schema.
用户模式下的所有触发器全部被删除
Oracle Database does not drop roles created by the user.
被删除用户建立的其他用户不会被删除
Oracle中drop user和drop user cascade的区别的更多相关文章
- Oracle中的rownum 和rowid的用法和区别
Oracle中的rownum 和rowid的用法和区别 1.rownum是伪列,是在获取查询结果集后再加上去的 (获取一条记录加一个rownum).对符合条件的结果添加一个从1开始的序列号. eg ...
- oracle中删除表:drop、delete、truncate
相同点,使用drop delete truncate 都会删除表中的内容 drop table 表名 delete from 表名(后面不跟where语句,则删除表中所有的数据) truncate t ...
- ORACLE中主键约束跟唯一索引的区别
分类: DB 2011-12-03 21:34 611人阅读 评论(0) 收藏 举报 oracleconstraintsimmutableusertabledomain 1. 分别用两种方法创建主键 ...
- Oracle 中for update和for update nowait的区别
http://www.cnblogs.com/quanweiru/archive/2012/11/09/2762223.html 1.for update 和 for update nowait 的区 ...
- Oracle 中 for update 和 for update nowait 的区别
原文出处http://bijian1013.iteye.com/blog/1895412 一.for update 和 for update nowait 的区别 首先一点,如果只是select 的话 ...
- oracle中 some、any、all 三者的区别及个人总结,归纳!
any :如果是大于号时( a > b ),那么a中所有大于b中最小的那个数的值,就会被输出出来. 如果是小于号时( a < b ),那么a中所有小于b中最大的那个数的值,就会被输出出来. ...
- ORACLE 中rownum和row_number()的使用区别(可指定取sql结果集的第几个数据)
这篇文章主要介绍了oracle中rownum和row_number()的使用方法以及区别和联系,十分的详细,有需要的小伙伴可以参考下. row_number()over(partition by ...
- ORACLE中Drop table cascade constraints之后果.
当你要drop一个table时,如果删除table的动作会造成trigger或constraint产生矛盾,系统会出现错误警告的讯息而不会允许执行..一个极简单的例子,例如你有一个员工基本资料表,上面 ...
- 在Oracle中恢复被DROP掉的表
在Oracle中可能不小心会DROP掉一个表,如果没有定期做备份的话,将会带来很大的麻烦.如果有的情况下,每天的数据都很重要,而定期备份的周期又稍长,情况恐怕也不容乐观!以前只知道Windows有个回 ...
随机推荐
- 你所不知道的java编程思想
读thinking in java这本书的时候,有这么一句话“在编译单元的内部,可以有一个公共(public)类,它必须拥有与文件相同的名字” 有以下疑问: 在一个类中说可以有一个public类,那是 ...
- [jQuery] 使用jQuery printPage plugin打印其他頁面內容
目標: 點選按鈕後可以打印其他頁面的內容,可用於套版.內部表單套印...等等. 程式碼: 1.View(HTML布局) <h2>維修申請單</h2> <form id=& ...
- CSS flex 布局 一些基本属性应用
作用于伸缩盒元素上的属性 box-orient .box-pack.box-align.box-direction.box-lines box-orient box-orient:horizontal ...
- [原创]旧事重提:只配置参数实现OAuth2登录
其实这个组件写出来很长时间了,有几个月吧,一直在 MrHuo工作室 上放着,一直说要整理,太忙没时间. 另外,关于OAuth2的一些基础内容还请从网上找找资料,太多了,写的累赘. 废话不多说,先上图 ...
- C#三个平台上的文件选择方法
wpf: Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = &qu ...
- 记一次令人发狂的 bug Eclipse 开不开 tomcat 7.0
改项目,结果发现以前的项目也出了问题,就删除了系统用户下面workplace里的文件夹,结果,eclipse被清空,重新添加项目,发现一堆bug; 最让我崩溃的是,用tomcat 7.0跑项目,反复出 ...
- macbook安装mysql
一.官网下载dmg文件 二.双击安装dmg文件,一路next: 三.
- jQuery 文字截取
HTML <div class="summary"> <p class="news">业内知道,当赵科林“过档”联想之初,恰逢联想 ...
- web api简单验证实现办法
需要使用WEBAPI,但是有验证问题没解决.后来参考网上文章做了一下DEMO 思路: 就是根据用户的账号在服务端加密一个字符串,然后返回给用户端. 具体: 一个用户编号用于唯一身份识别,密码,一个密钥 ...
- [转]hibernate主键生成策略
1.自动增长identity 适用于MySQL.DB2.MS SQL Server,采用数据库生成的主键,用于为long.short.int类型生成唯一标识使用SQL Server 和 MySQL 的 ...