临时禁止外键:
alter table EMP modify constraint FK_DEPTNO disable;
查询依赖某个表上主键的所有外键:
select *
from user_constraints t
where t.constraint_type = 'R'
and t.r_constraint_name in
(select p.constraint_name
from user_constraints p
where p.constraint_type = 'P'
and p.table_name = 'xxx')
alter table EMP modify constraint FK_DEPTNO disable;
查询依赖某个表上主键的所有外键:
select *
from user_constraints t
where t.constraint_type = 'R'
and t.r_constraint_name in
(select p.constraint_name
from user_constraints p
where p.constraint_type = 'P'
and p.table_name = 'xxx')
本文介绍如何在数据库中临时禁用表EMP上的外键约束,并提供查询所有依赖于指定表主键的外键的方法。
1415

被折叠的 条评论
为什么被折叠?



