Bird
0
0

If a user has been granted SELECT and UPDATE permissions on a table, what will be the result of the following command?

medium📝 query result Q5 of 15
PostgreSQL - Roles and Security
If a user has been granted SELECT and UPDATE permissions on a table, what will be the result of the following command?
REVOKE UPDATE ON table1 FROM user1;
AUser1 will lose all permissions on table1
BUser1 will have only SELECT permission on table1
CUser1 will still have UPDATE permission
DUser1 will have no permissions revoked
Step-by-Step Solution
Solution:
  1. Step 1: Understand the initial permissions

    User1 has SELECT and UPDATE permissions on table1.
  2. Step 2: Apply the REVOKE UPDATE command

    REVOKE UPDATE removes only the UPDATE permission, leaving SELECT intact.
  3. Final Answer:

    User1 will have only SELECT permission on table1 -> Option B
  4. Quick Check:

    REVOKE removes specified permissions only [OK]
Quick Trick: REVOKE removes only listed permissions, others stay [OK]
Common Mistakes:
  • Assuming REVOKE removes all permissions
  • Confusing REVOKE with GRANT
  • Ignoring existing permissions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes