Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

FK status after PK disable and re-enable

Roger25Feb 8 2024

Hello,

I'm doing this:

create table emp (
emp_no number(2) constraint pk primary key,
ename varchar2(30),
mgr_no number(2))

alter table emp add constraint fk foreign key (mgr_no) references emp(emp_no) on delete set null
alter table emp disable constraint pk cascade;
alter table emp enable constraint pk;

So when I disable the pk, I know that fk is automatically disabled. But when I re-enable it, the fk will be still disabled?

And the PK will be enabled as immediate and not deferred ? Why?

Comments
Post Details
Added on Feb 8 2024
1 comment
55 views