oracle往dept表中插入dept表中插入重复数据,如何删除唯一约束,以及其它表对dept主键的外键引用

2025-06-22 04:58:49
推荐回答(1个)
回答1:

首先删除emp表中关联dept的外键约束:
alter table EMP drop constraint FK_DEPTNO;

再删除dept的主键约束:
alter table DEPT drop constraint PK_DEPT;

这样就能插入重复数据了。