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
ORA-26029: index string.string partition string initially in unusable state
ORA-26094: stream format error: input column overflow
IMP-00096: Warning: Skipping table "string"."string" because type synonym "string"."string" cannot be created
IMP-00064: Definition of LOB was truncated by export
ORA-26030: index string.string had string partitions made unusable due to:
IMP-00060: Warning: Skipping table "string"."string" because object type "string"."string" does not exist or has different identifier
ORA-26076: cannot set or reset value after direct path structure is allocated
if the lengths of two wires are same and the area of cross sections is 4:7 then what will be the ratio of current passing through these wires
IMG-02003: 2FF03 - incorrect color histogram feature specification
NZE-28890: Entrust Login Failed
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...
ORA-26084: direct path context already finished
[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
ORA-26095: unprocessed stream data exists
IMP-00063: Warning: Skipping table "string"."string" because object type "string"."string" cannot be created or has different identifier