Question 1
The owner of HR.DEPARTMENTS granted the REFERENCES privilege on it to user SALES, who then created a foreign key on SALES.ORDERS pointing at HR.DEPARTMENTS(dept_id). HR now runs `REVOKE REFERENCES ON departments FROM sales CASCADE CONSTRAINTS;`. What is the result?
A. The REVOKE succeeds and the privilege is removed, but the existing foreign-key constraint on SALES.ORDERS remains fully enforced.
This assumes the dependent constraint survives. The foreign key exists only because of the REFERENCES privilege; revoking that privilege with CASCADE CONSTRAINTS drops the constraint rather than leaving it in force.
B. The REVOKE fails; a REFERENCES privilege with a dependent foreign key cannot be revoked, even with CASCADE CONSTRAINTS.
This is the 'REFERENCES with dependents is un-revokable' misconception. Omitting CASCADE CONSTRAINTS would raise an error, but supplying it is precisely what authorizes the revoke by dropping the dependent constraints.
C. It was SELECT, not REFERENCES, that was required to define the foreign key, so revoking REFERENCES has no effect on the constraint.
This is the 'SELECT enables a foreign key' misconception. Creating a foreign key that points at another user's table requires the REFERENCES privilege on that table, not SELECT, so revoking REFERENCES directly affects the constraint.
D. The foreign-key constraint on SALES.ORDERS is dropped along with the revoked REFERENCES privilege.Correct answer
The foreign key depends on the REFERENCES privilege that made it possible. REVOKE ... REFERENCES ... CASCADE CONSTRAINTS removes the privilege and drops every FK constraint that relied on it, so the constraint on SALES.ORDERS is dropped.
Explanation
Defining a foreign key against another user's table requires the REFERENCES object privilege on that table, and any such constraint depends on the privilege continuing to exist. Revoking REFERENCES therefore cannot leave the dependent foreign key standing: CASCADE CONSTRAINTS must be supplied so the revoke can drop those constraints, and without it the revoke would error. The constraint is removed as a consequence of the revoke, not preserved.