ORA-02292:integrity constraint(xx) violated - child record found 外键关联,无法删除记录

当我们删除 有外键的数据的时候 oracle 都会提示:ORA-02292:integrity constraint(xx) violated - child record found 

第一步:让主键失效:alter table table_name disable primary key cascade;

第二步:删除数据:delete from  table_name  where id = 'xx';

第三步:让主键生效:alter table table_name enable primary key;

猜你喜欢

转载自blog.csdn.net/panlin1506913260/article/details/84939817