ORA-02270: no matching unique or primary key for this
column-list
Answers were Sorted based on User's Feedback
Answer / sangam
ORA-02270: no matching unique or primary key for this
column-list
This error also occurs when we try to add a foreign key
constraint to a table and there does not exist primary key
in the referenced table or the column being referenced is
not a promary key.
http://dotnetspidor.blogspot.com
Is This Answer Correct ? | 12 Yes | 3 No |
Answer / guest
Cause: A REFERENCES clause in a CREATE/ALTER TABLE statement
gives a column-list for which there is no matching unique or
primary key constraint in the referenced table.
Action: Find the correct column names using the
ALL_CONS_COLUMNS catalog view
Please add more information about this Error
Is This Answer Correct ? | 8 Yes | 3 No |
Answer / 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 |
Answer / jay
please u can check your primary key field
after set unique yes
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / chetan
CAUSE:You tried to reference a table using a unique or
primary key, but the columns that you listed did not match
the primary key, or a primary key does not exist for this
table.
SOL:
This error commonly occurs when you try to create a foreign
key that references a table that doesn't have a primary
key. To resolve this problem, create a primary key on the
referenced table. Then re-execute your command to create
the foreign key.
Is This Answer Correct ? | 1 Yes | 3 No |
TNS-00210: Total Pumps Available : number
ORA-16089: archive log has already been registered
PCC-02369: An EXEC TOOLS host pointer variable is not a pointer
PLS-00568: cannot access rows from a non-nested table item
ORA-33450: (ESDREAD05) Discarding compiled code for workspace object because number now has more or fewer dimensions than it had when the code was compiled.
ORA-02281: duplicate or conflicting CACHE/NOCACHE specifications
ORA-16036: invalid MANAGED recovery CANCEL option
DRG-50701: error in listener.get_cmd()
ORA-30175: invalid type given for an argument
ORA-12070: cannot offline instantiate materialized view "string"."string"
RMAN-08112: archivelog failover was done on string, check alert log for more info
ORA-39952: only numbers can be specified as range values