USER_CONSTRAINTS

描述了所有的当前用户的所拥有的表的所有约束定义。列的内容和all_constraints相同

all_当前用户可接触的所有约束
user_当前用户的表的所有约束
dba_数据库的所有约束
三种约束情形。

CONSTRAINT_TYPE ,约束类型,本着节省使用空间的设计角度,这种类型的描述基本都是用字母来表示固定的概念。如C表示check constraint,P表示Primary Key,U表示unique,R表示Referential integrity,V表示With check option,O表示Read only,H表示Hash expression, F表示Constraint that involves a REF column,S表示Supplemental logging。(照搬了文档)
这块如果要优化的话,可以建议oracle开发插件,直接可以把这些东西和文档关联起来,方便新手入门。
SEARCH_CONDITION 检查约束的搜索条件的文本。得在正确的容器下,不然不能用。也就是说只能看自己的。
R_OWNER Owner of the table referred to in a referential constraint
** R_CONSTRAINT_NAME** Name of the unique constraint definition for the referenced table

** DELETE_RULE** 约束的删除条件 CASCADE, SET NULL,NO ACTION

STATUS ENABLED.DISABLED 约束的强制执行状态 大概该约束是否强制执行?
DEFERRABLE 指示约束是否可延迟(DEFERRABLE)(NOT DEFERRABLE
DEFERRED Indicates whether the constraint was initially deferred (DEFERRED) or not (IMMEDIATE) 指示约束刚开始,最初是不是有延迟。
VALIDATEDSTATUS 有着关系,当STATUS=ENABLED

•VALIDATED - All data obeys the constraint (that is, the existing data in the table was validated when the constraint was enabled, as well as any subsequent data entered into the table)

•NOT VALIDATED - All data may not obey the constraint (that is, the existing data in the table was not validated when the constraint was enabled, but subsequent data entered into the table was validated)

STATUS = DISABLED

•VALIDATED - All data obeys the constraint, but the unique index on the constraint has been dropped. This setting is useful in data warehousing environments, but has some restrictions. Refer to Oracle Database Data Warehousing Guide for more information on this setting.

•NOT VALIDATED - All data may not obey the constraint

GENERATED 显示这个约束的血统问题,是系统自带的,还是用户创建的。

Indicates whether the name of the constraint is user-generated (USER NAME) or system-generated (GENERATED NAME)

这个引用感觉弄得不好。
BAD 这个约束表达“世纪” 用一种模糊的方式还是不是用模糊的方式,为了避免这个错误,重写约束时使用to_date函数时用yyyy,rrrr这种四位数字的年份。 没搞懂这个参数的意义是什么。难道是程序员没事干了?
RELY 也是分情况的。当 VALIDATED = NOT VALIDATED,这个就表示为重写时是否要考虑约束。

When VALIDATED = NOT VALIDATED, this column indicates whether the constraint is to be taken into account(考虑) for query rewrite (RELY) or not (NULL).

When VALIDATED = VALIDATED, this column is not meaningful.

invalid 指出这个约束是否无效。
VIEW_RELATED 指出这个约束是否依赖视图,这是个什么场景? (DEPEND ON VIEW or NULL)
ORIGIN_CON_ID 一看就和多租户有关,不用详细介绍
oracle
在这里插入图片描述

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值