Thứ Sáu, 5 tháng 10, 2018

ORA-02273: this unique/primary key is referenced by some foreign keys


1. Errors
alter table DEPARTMENTS# drop constraint departments_pk;

ORA-02273: this unique/primary key is referenced by some foreign keys

2. Solutions
select * from all_constraints
where constraint_type='R' and r_constraint_name='DEPARTMENTS_PK';

alter table EMPLOYEES# drop constraint EMP_TO_DEPT_FK;

alter table JOB_HISTORY# drop constraint JOB_HIST_TO_DEPARTMENTS_FK;

alter table BINHTV.DEPARTMENTS# drop constraint departments_pk; --> OK



ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master