What would be the status of the foreign key EMP_MGR_FK?

Evaluate the following SQL statements that are issued in the given order: CREATE TABLE

emp (emp_no NUMBER(2) CONSTRAINT emp_emp_no_pk PRIMARY KEY,
enameVARCHAR2(15), salary NUMBER(8,2), mgr_no NUMBER(2) CONSTRAINT
emp_mgr_fk REFERENCES emp); ALTER TABLE emp DISABLE CONSTRAINT
emp_emp_no_pk CASCADE; ALTER TABLE emp ENABLE CONSTRAINT
emp_emp_no_pk; What would be the status of the foreign key EMP_MGR_FK?

Evaluate the following SQL statements that are issued in the given order: CREATE TABLE

emp (emp_no NUMBER(2) CONSTRAINT emp_emp_no_pk PRIMARY KEY,
enameVARCHAR2(15), salary NUMBER(8,2), mgr_no NUMBER(2) CONSTRAINT
emp_mgr_fk REFERENCES emp); ALTER TABLE emp DISABLE CONSTRAINT
emp_emp_no_pk CASCADE; ALTER TABLE emp ENABLE CONSTRAINT
emp_emp_no_pk; What would be the status of the foreign key EMP_MGR_FK?

A.
It would be automatically enabled and deferred.

B.
It would be automatically enabled and immediate.

C.
It would remain disabled and has to be enabled manually using the ALTER TABLE
command.

D.
It would remain disabled and can be enabled only by dropping the foreign key constraint
and re-creating it.



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Eva

Eva

The correct answer is C

ming

ming

obviously the answer is C

satya

satya

I have tested,the Correct Answer is C