ORA-02273: this unique/primary key is referenced by some foreign keys
A primary key cannot be dropped as long as foreign keys reference it. An attempt to do so results in the error message ORA-02273: this unique/primary key is referenced by some foreign keys.
This is demonstrated with the following simple snippets.
Create two tables with a primary key-foreign key relation:
create table tq84_P (
id integer,
txt varchar2(10) not null,
constraint tq84_P_pk primary key (id)
);
create table tq84_C (
id_p not null,
val number(5,2),
constraint tq84_C_fk foreign key (id_p) references tq84_P
);
The following statement throws ORA-02273: this unique/primary key is referenced by some foreign keys: