iis服务器助手广告广告
返回顶部
首页 > 资讯 > 错误编码 >ORA-22894: cannot add constraint on existing unscoped REF columns of non-empty tables ORACLE 报错 故障修复
  • 195
分享到

ORA-22894: cannot add constraint on existing unscoped REF columns of non-empty tables ORACLE 报错 故障修复

报错故障constraint 2023-11-05 04:11:04 195人浏览 薄情痞子
摘要

文档解释 ORA-22894: cannot add constraint on existing unscoped REF columns of non-empty tables Cause: An attempt was made to

文档解释

ORA-22894: cannot add constraint on existing unscoped REF columns of non-empty tables

Cause: An attempt was made to add a constraint to existing unscoped REF columns of a table which contains one or more rows.

Action: Remove the constraint specification or add the constraint after emptying the table.

ORA-22894:不能在非空表上现有未约束REF列上添加约束

官方解释

该错误消息在向现有REF列添加约束时报告。

常见案例

当用户试图在现有REF列上添加约束时报告此错误,如下所示:

ALTER TABLE table_name

ADD CONSTRAINT constraint_name

FOREIGN KEY ref_column_name REFERENCES …;

一般处理方法及步骤

1.如果此表包含数据,则应使用“enable novalidate”选项创建约束。

2.更新数据,以确保约束条件得到满足。

3.从新创建约束:

ALTER TABLE table_name

ADD CONSTRAINT constraint_name FOREIGN

KEY ref_column_name REFERENCES …

enable validate;

--结束END--

本文标题: ORA-22894: cannot add constraint on existing unscoped REF columns of non-empty tables ORACLE 报错 故障修复

本文链接: https://www.lsjlt.com/news/533060.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作