ORA-22898: existing scope clause on “string” points to a table other than the one mentioned in the referential constraint
Cause: Table mentioned in the referential integrity constraint is different from the scope table of the REF column.
Action: Specify the scope table of the REF column in the referential integrity constraint and then retry the operation.
ORA-22898错误表明存在一个作用域规范(scope clause)指向一个不同于在引用约束中指定的数据表的数据表。
ORA-22898: SCOPE clause on string points to a table other than the one mentioned in the referential constraint string Cause: A Scope clause of a referential constraint incorrectly points to a different table than the reference table. Action: Check the constraint definition and modify the Scope clause to point to correct table.
ORA-22898可能在当 SQL 语句尝试创建具有作用域规范的引用约束时报出,或者在当使用 EXECUTE IMMEDIATE 语句试图更新某种形式的约束时报出。
1.查询当前控制表:SELECT * FROM dba_constraints WHERE constraint_name= 'CONSTRAINT_NAME’;
2.确定Scope clause指定的表。
3.确定约束指定的表。
4.使用ALTER TABLE更改指定的表的作用域规范:ALTER TABLE table_name MODIFY CONSTRAINT constraint_name SCOPE clause;
5.重新执行SQL语句,对其进行修复。