Multiple choice

Which command would revoke the ROLE_DATA role from all users?

  1. REVOKE role_data FROM ALL;

  2. REVOKE role_data FROM PUBLIC;

  3. REVOKE role_data FROM default;

  4. REVOKE role_data FROM ALL_USERS;

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

To revoke a role from all users, use the REVOKE...FROM PUBLIC statement. PUBLIC is a special user group that includes all database users. Options A, C, and D use incorrect syntax - ALL, default, and ALL_USERS are not valid keywords for revoking roles from everyone. Option B uses the correct PUBLIC keyword to remove the role from all users at once.