Notice
Recent Posts
Recent Comments
Link
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Tags more
Archives
Today
Total
관리 메뉴

jeongwon

[Error] ORA-02292: integrity constraint (~.SYS_C007946) violated - child record found 본문

Error log

[Error] ORA-02292: integrity constraint (~.SYS_C007946) violated - child record found

jeongwon_ 2022. 10. 28. 02:37

오류:

ORA-02292: integrity constraint (~.SYS_C007946) violated - child record found

 

상황: delete from TB;  실행 중 오류

 

해결:

select
    constraint_name,
    table_name,
    r_constraint_name
from
    user_constraints
where
    constraint_name = 'SYS_C007946';

 

어떤 테이블과 연결되어 있는지 확인 => 자식 테이블 레코드 삭제 => 해당 테이블 레코드 삭제 처리.

 

 

참고:

자식 테이블의 외래키 제약조건에 ON DELETE CASCADE를 추가하면, 참조하는 부모 테이블의 기본키가 삭제되었을 때 함께 삭제되도록 할 수 있다.