Evaluate the following SQL statements that are issued in the given order:CREATE TABLE emp -(emp_no NUMBER(2) CONSTRAINT

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899559
Joined: Mon Aug 02, 2021 8:13 am

Evaluate the following SQL statements that are issued in the given order:CREATE TABLE emp -(emp_no NUMBER(2) CONSTRAINT

Post by answerhappygod »

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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!

This question has been solved and has 1 reply.

You must be registered to view answers and replies in this topic. Registration is free.


Register Login
 
Post Reply