When the oracle delete table data, suggesting that the only constraint violation, child records have been found, a solution

This problem is because you delete this table is the main table, his association with the primary key foreign key in other tables, you must delete the data word table can delete the main table.

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 = 'FK_XXXXX'

With this statement can be found in the child table.

tip: When you delete a table of data, suggesting that the trigger process execution error, may trigger the ban, after then deleted.

Guess you like

Origin www.cnblogs.com/lovejingjing/p/11115711.html