ORA-02270: no matching unique or primary key for this
column-list

Answer Posted / pauline wan

You tried to reference a table using a unique key, but the
column that you listed only have unique index instead of
unique constraint. For example, referenced table called A
has PK column a1, another column a2, a2 has unique index
but not unique constraint, child table B has PK column b1
and another column b2. Now if you want to add FK on
table B column b2 which references table A column a2, you
will get ORA-02270.

To solve the problem, you need to drop unique index on
table A column a2 and create unique constraint on table A
column a2, then add FK on table B column b2.

The tricky is unique index has same functionality as unique
constraint which uniquely identify the data on the column,
but it doesn't have information in user_constraints,
all_constraints,dba_constraints.

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

IMP-00063: Warning: Skipping table "string"."string" because object type "string"."string" cannot be created or has different identifier

2316


Hi guys, I have four tables those are emp,dept,eliminate and uneliminate. i wrote small cursor..when i run, it display one error (ORA-01403 nodata found)... The query is: Declare cursor c1 is select e.ename emp_name from emp e,dept d where e.deptno=d.deptno group by deptno; r1 c1%rowtype; test_emp varchar2(200); begin for r1 in c1 loop begin select eliminate_emp into test_emp from eliminate t,uneliminate ut where t.number=ut.number and t.deptno=e.deptno and rownum<1; end; dbms_output.put_line(r1.emp_name); end loop; end; Thanks...

2273


ORA-26028: index string.string initially in unusable state

3424


RMAN-05017: no copy of datafile number found to recover

1906


[ERROR] [main 11:01:20] (JCLLoggerAdapter.java:error:454) Unsuccessful: alter table user.CEN_USER_MASTER add constraint FKF4EDEDC3D0BAAE75 foreign key (ROLE_ID) references user.CEN_ROLE_MASTER [ERROR] [main 11:01:20] (JCLLoggerAdapter.java:error:454) ORA-02275: such a referential constraint already exists in the table

2302






ORA-26084: direct path context already finished

1496


invalid quantity specification negative quantity are not allowed for this item please check this item definition quantity

2879


IMP-00064: Definition of LOB was truncated by export

5906


How to resolve QSM-01108 error. I have no OR conditions in my query, but do have 9 IN conditions. The error says the max limit is 2 while I have 257 number of disjuncts. However, if I remove even a single IN condition, the query is rewritten. I cannot change my query. How can I resolve this issue?

2327


ORA-26027: unique index string.string partition string initially in unusable state

6182


ORA-16516: The current state is invalid for the attempted operation.

8098


when i ran any workflow or session, getting below error: seesion task instance[s_xxx]: Execution terminated unexpecterdly

1764


ORA-26029: index string.string partition string initially in unusable state

1729


ORA-16627: No standby databases support the overall protection mode.

3570


NZE-28890: Entrust Login Failed

1420