Bird
0
0

Identify the error in the following command:

medium📝 Debug Q14 of 15
PostgreSQL - Roles and Security
Identify the error in the following command:
REVOKE ALL PRIVILEGES employees FROM bob;
AThe order of keywords is incorrect.
BThe user name should be before the table name.
CREVOKE cannot be used with ALL PRIVILEGES.
DThe command is correct.
Step-by-Step Solution
Solution:
  1. Step 1: Check correct REVOKE syntax

    The correct syntax is: REVOKE privileges ON object FROM user;
  2. Step 2: Compare with given command

    The command uses: REVOKE ALL PRIVILEGES employees FROM bob; missing ON keyword and wrong order.
  3. Final Answer:

    The order of keywords is incorrect. -> Option A
  4. Quick Check:

    REVOKE + privileges + ON + object + FROM + user [OK]
Quick Trick: REVOKE syntax requires ON before object [OK]
Common Mistakes:
  • Omitting ON keyword
  • Swapping user and object positions
  • Using ALL PRIVILEGES incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes