ORA-02292: 違反完整約束條件 (CREDIT_QUERY2.SYS_C0027968) - 已找到子記錄
報錯信息如上:
解決辦法:
直接使用下面語句
select a.constraint_name, a.table_name, b.constraint_name
from user_constraints a, user_constraints b
where a.constraint_type = 'R'
and b.constraint_type = 'P'
and a.r_constraint_name = b.constraint_name
and a.constraint_name = 'SYS_C0027968'
查詢結果的table_name就是子記錄所在的表,直接執行刪除即可!