這個問題是因為你刪除這個表是主表,他的主鍵關聯着其他表的外鍵,必須先刪除字表的數據,才可以刪除主表。
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'
用這個語句可以找到子表。
tip:刪除表數據時,提示觸發器執行過程出錯,可以把觸發器禁止,之后再刪除。