Multiple choice technology databases

User system granted SELECT ANY TABLE to user A using WITH ADMIN OPTION. A then granted SELECT ANY TABLE to user B. Ian A left the company, and his account is dropped. What happens to B's privileges?

  1. B loses his privileges.

  2. B retains his privileges.

  3. B loses his privileges if A was dropped with the CASCADE REVOKE option.

  4. B retains his privileges if A was dropped with the NOCASCADE REVOKE option.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

SELECT ANY TABLE is a system privilege granted with WITH ADMIN OPTION. System privileges granted by one user are NOT automatically revoked when that user is dropped. B keeps the privilege because it was granted directly from the system, not dependent on A's account.

AI explanation

To answer this question, we need to understand how privilege inheritance works in Oracle databases.

When user A is granted the SELECT ANY TABLE privilege with the WITH ADMIN OPTION, it means that A can not only select from any table but also grant the same privilege to other users.

When A grants the SELECT ANY TABLE privilege to user B, B inherits the privilege from A. This means that B retains the privilege independently of A's account status.

Therefore, even if A's account is dropped or revoked, user B will still retain the SELECT ANY TABLE privilege.

The correct answer is B. B retains his privileges.