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
IMP-00060: Warning: Skipping table "string"."string" because object type "string"."string" does not exist or has different identifier
ORA-26028: index string.string initially in unusable state
ORA-16626: failed to enable specified object
ORA-16516: The current state is invalid for the attempted operation.
ORA-16627: No standby databases support the overall protection mode.
When i am connect database through toad,one error occured. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor. plz help me thanks advance.............
ORA-26095: unprocessed stream data exists
RMAN-05017: no copy of datafile number found to recover
[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-26027: unique index string.string partition string initially in unusable state
ORA-26079: file "string" is not part of table string.string
ORA-26029: index string.string partition string initially in unusable state
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...
IMP-00064: Definition of LOB was truncated by export
ORA-26084: direct path context already finished